Documentation
¶
Index ¶
Constants ¶
View Source
const PluginFactoryName = "NewPlugin"
PluginFactoryName is the required name for the plugin factory.
View Source
const PluginIDName = "PluginID"
View Source
const PluginVersionName = "PluginVersion"
View Source
const Version = "prometheus/slo/v1"
Version is this plugin type version.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Plugin ¶
Plugin knows how to process SLOs in a chain of plugins. * The plugin processor can change the result argument of the SLO processing with the resulting prometheus rules. * The plugin processor can also modify the request object, but this is not recommended as it can lead to unexpected behavior.
This is the type the SLO plugins need to implement.
type PluginFactory ¶
type PluginFactory = func(config json.RawMessage, appUtils AppUtils) (Plugin, error)
type PluginID ¶
type PluginID = string
PluginID is the ID of the plugin (e.g: sloth.dev/my-test-plugin/v1).
type PluginVersion ¶
type PluginVersion = string
PluginVersion is the version of the plugin (e.g: `prometheus/slo/v1`).
type Request ¶
type Request struct { // Info about the application and execution, normally used as metadata. Info model.Info // OriginalSource is the original specification of the SLO came from, this is informative data that // can be used to make decision on plugins, it should be used only as RO. // The information used on the generation is the SLO model itself not this one. OriginalSource model.PromSLOGroupSource // The SLO to process and generate the final Prom rules. SLO model.PromSLO // The SLO MWMBAlertGroup selected. MWMBAlertGroup model.MWMBAlertGroup }
type Result ¶
type Result struct {
SLORules model.PromSLORules
}
Click to show internal directories.
Click to hide internal directories.