Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JoinKeyValues ¶
JoinKeyValues create a slice of the provided map, joining the keys with their values using the defined separator
Types ¶
type PluginBuilder ¶
type PluginBuilder struct {
// contains filtered or unexported fields
}
func NewPluginBuilder ¶
func NewPluginBuilder(cache *template.TemplateCache) *PluginBuilder
func (*PluginBuilder) Build ¶
func (b *PluginBuilder) Build(module *config.Module, ctx *PluginBuilderContext) (*monitoring.Plugin, error)
type PluginBuilderContext ¶
PluginBuilderContext is a template execution context
func NewLazyPluginBuilderContext ¶
func NewLazyPluginBuilderContext(vars map[string]config.LazyArray, env map[string]string) *PluginBuilderContext
NewLazyPluginBuilderContext creates a new plugin builder context. the variables are copied as is to match the type signature of the internal struct member.
func NewPluginBuilderContext ¶
func NewPluginBuilderContext(vars map[string][]string, env map[string]string) *PluginBuilderContext
NewPluginBuilderContext creates a new plugin builder context
func (*PluginBuilderContext) VisitEnvironment ¶
func (c *PluginBuilderContext) VisitEnvironment(provider func(string) string) *PluginBuilderContext
VisitEnvironment populates the instance Vars with values from the provider. If the provider does not yield a value for the map keys, the original value is used as fallback. If the result of that operation yields an empty value (i.e. an empty string), the key will be remove from the instance map.
func (*PluginBuilderContext) VisitVariables ¶
func (c *PluginBuilderContext) VisitVariables(provider func(string) []string) *PluginBuilderContext
VisitVariables populates the instance Vars with values from the provider. If the provider does not yield a value for the map keys, the original value is used as fallback. If the result of that operation yields an empty value (i.e. nil or an empty slice), the key will be remove from the instance map.
Empty values are removed from the map values as well
type PluginMetrics ¶
type PluginMetrics struct {
// contains filtered or unexported fields
}
func NewPluginMetrics ¶
func NewPluginMetrics(module *config.Module, namespace string) *PluginMetrics
func (*PluginMetrics) Register ¶
func (m *PluginMetrics) Register(registry *prometheus.Registry) error
func (*PluginMetrics) Report ¶
func (m *PluginMetrics) Report(output *monitoring.PluginResult, err error, duration float64)