structs

package
v0.0.0-...-c0ac931 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2020 License: Apache-2.0 Imports: 0 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	Name string `mapstructure:"name"`
	Kind string `mapstructure:"kind"`
	// Cloudwatch specific
	Region string `mapstructure:"region"`
	// Graphite-specific
	Host     string `mapstructure:"host"`
	Username string `mapstructure:"username"`
	Password string `mapstructure:"password"`
	// Influx specific
	Addr      string `mapstructure:"addr"`
	Timeout   string `mapstructure:"timeout"`
	UserAgent string `mapstructure: "useragent"`
}

Backend struct

type Backender

type Backender interface {
	Info() *Backend
	GetValue(rule Rule) (float64, error)
}

Backender interface

type Rule

type Rule struct {
	Name            string
	Backend         string `hcl:"backend"`
	BackendInstance Backender
	Comparison      string            `hcl:"comparison"`
	ComparisonValue float64           `hcl:"comparison_value,float"`
	Action          string            `hcl:"action"`
	ActionValue     int               `hcl:"action_value,int"`
	MetricName      string            `hcl:"metric_name"`
	MetricNamespace string            `hcl:"metric_namespace"`
	Dimensions      map[string]string `hcl:"dimensions"`
	Period          string            `hcl:"cron"`
	MeasurementName string            `hcl:"measurement_name"`
	DatabaseName    string            `hcl:"database_name"`
	FieldName       string            `hcl:"field"`
	Selector        string            `hcl:"selector"`
	WhereClause     map[string]string `hcl:"where_clause"`
	TimePeriod      string            `hcl:"time_period"`
}

Rule struct

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL