Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CloudWatchBackend ¶
type CloudWatchBackend struct { Name string Config CloudWatchConfig Connection *cloudwatch.CloudWatch }
CloudWatchBackend is a metrics backend
func NewCloudWatchBackend ¶
func NewCloudWatchBackend(name string, config CloudWatchConfig) (*CloudWatchBackend, error)
NewCloudWatchBackend will create a new CloudWatch Client
func (*CloudWatchBackend) GetValue ¶
func (b *CloudWatchBackend) GetValue(rule structs.Rule) (float64, error)
GetValue gets a value
func (*CloudWatchBackend) Info ¶
func (b *CloudWatchBackend) Info() *structs.Backend
type CloudWatchConfig ¶
CloudWatchConfig is the configuration for a CloudWatch backend
type ConfiguredBackends ¶
ConfiguredBackends struct
func InitializeBackends ¶
func InitializeBackends(backends map[string]structs.Backend) (ConfiguredBackends, error)
InitializeBackends loads valid backends into a map
type GraphiteBackend ¶
type GraphiteBackend struct { Name string Config GraphiteConfig Connection *graphite.Client }
GraphiteBackend is a metrics backend
func NewGraphiteBackend ¶
func NewGraphiteBackend(name string, config GraphiteConfig) (*GraphiteBackend, error)
NewGraphiteBackend will create a new Graphite Client
func (*GraphiteBackend) GetValue ¶
func (b *GraphiteBackend) GetValue(rule structs.Rule) (float64, error)
GetValue gets a value
func (*GraphiteBackend) Info ¶
func (b *GraphiteBackend) Info() *structs.Backend
type GraphiteConfig ¶
GraphiteConfig is the configuration for a Graphite backend
type InfluxDbBackend ¶
type InfluxDbBackend struct { Name string Config InfluxDbConfig Connection influx.Client }
InfluxDbBackend is a metrics backend
func NewInfluxDbBackend ¶
func NewInfluxDbBackend(name string, config InfluxDbConfig) (*InfluxDbBackend, error)
NewInfluxDbBackend will create a new InfluxDB Client
func (*InfluxDbBackend) GetValue ¶
func (b *InfluxDbBackend) GetValue(rule structs.Rule) (float64, error)
GetValue gets a value
func (*InfluxDbBackend) Info ¶
func (b *InfluxDbBackend) Info() *structs.Backend
type InfluxDbConfig ¶
type InfluxDbConfig struct { Name string Kind string Addr string Username string Password string UserAgent string Timeout string }
InfluxDbConfig is the configuration for a InfluxDB backend
type PrometheusBackend ¶
type PrometheusBackend struct { Name string Config PrometheusConfig Connection prometheus.QueryAPI }
PrometheusBackend is a metrics backend
func NewPrometheusBackend ¶
func NewPrometheusBackend(name string, config PrometheusConfig, queryApi prometheus.QueryAPI) (*PrometheusBackend, error)
NewPrometheusBackend will create a new Prometheus Client
func (*PrometheusBackend) GetValue ¶
func (b *PrometheusBackend) GetValue(rule structs.Rule) (float64, error)
GetValue gets a value
func (*PrometheusBackend) Info ¶
func (b *PrometheusBackend) Info() *structs.Backend
type PrometheusConfig ¶
PrometheusConfig is the configuration for a Prometheus backend