Documentation
¶
Index ¶
Constants ¶
View Source
const ( // OpenStackType represents a OpenStack type OpenStackType string = "openstack" // PrometheusType is a Prometheus backend PrometheusType string = "prometheus" FixedDelay string = "fixed" BackoffDelay string = "backoff" // DefaultCloudPrefix is the default etcd prefix for Cloud data DefaultCloudPrefix string = "/clouds" DefaultHealerPrefix string = "/healers" DefaultHealerQuery string = "up{job=~\".*compute-cadvisor.*|.*compute-node.*\"} < 1" DefaultHealerInterval string = "18s" DefaultHealerDuration string = "3m" DefaultMaxNumberOfInstances int = 3 DefaultNResolverPrefix string = "/nresolvers" DefaultNResolverQuery string = "node_uname_info" DefaultNResolverInterval string = "30s" // DefaultScalerPrefix is the etcd default prefix for scaler DefaultScalerPrefix string = "/scalers" // DefaultSilencePrefix is default etcd prefix for Silences DefaultSilencePrefix string = "/silences" DefaultSilenceValidationInterval = "30s" )
View Source
const ( // DefaultClusterPrefix is the etcd default prefix for cluster DefaultClusterPrefix string = "/cluster" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ATEngine ¶ added in v0.2.0
type Action ¶
type Action struct { Type string `json:"type"` Attempts uint `json:"attempts,omitempty"` Delay string `json:"delay,omitempty"` DelayType string `json:"delay_type,omitempty"` }
Action represents an scale action
type ActionHTTP ¶
func (*ActionHTTP) Validate ¶
func (a *ActionHTTP) Validate() error
Validate returns nil if all fields of the Action have valid values.
type ActionInterface ¶
type ActionInterface interface {
Validate() error
}
type ActionMail ¶
type ActionMail struct { Action Receivers Receivers `json:"-"` Subject string `json:"subject"` Body string `json:"body"` }
func (*ActionMail) Validate ¶
func (a *ActionMail) Validate() error
type Cloud ¶
type Cloud struct { // The cloud provider type. OpenStack is the only provider supported by now Provider string `json:"provider"` ID string `json:"id,omitempty"` Endpoints map[string]URL `json:"endpoints"` Monitor Monitor `json:"monitor"` ATEngine ATEngine `json:"atengine"` Tags []string `json:"tags"` }
Cloud represents Cloud information. Other cloud provider models have to inherited this struct
type Healer ¶
type Healer struct { Actions map[string]ActionInterface `json:"ractions"` ActionsRaw map[string]json.RawMessage `json:"actions"` Active bool `json:"active"` Alert Alert `json:"alert,omitempty"` CloudID string `json:"cloudid"` Description string `json:"description"` Duration string `json:"duration"` EvaluationLevel int `json:"evaluation_level"` ID string `json:"id,omitempty"` Interval string `json:"interval"` Receivers Receivers `json:"receivers"` Query string `json:"query"` Tags []string `json:"tags"` }
Healer represents a Healer instance
type Member ¶
type Member struct { Name string `json:"name"` ID string `json:"id"` Address string `json:"address"` }
Member is the logical node
type Monitor ¶
type Monitor struct { Backend string `json:"backend"` Address URL `json:"address"` Metadata map[string]string `json:"metadata"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` }
Monitor represents a monitor backend
type NResolver ¶
type OpenStack ¶
type OpenStack struct { Cloud Auth OpenStackAuth `json:"auth"` }
OpenStack represents OpenStack information.
type OpenStackAuth ¶
type OpenStackAuth struct { // AuthURL specifies the HTTP endpoint that is required to work with // the Identity API of the appropriate version. While it's ultimately needed by // all of the identity services, it will often be populated by a provider-level // function. AuthURL string `json:"auth_url"` RegionName string `json:"region_name"` // Username is required if using Identity V2 API. Consult with your provider's // control panel to discover your account's username. In Identity V3, either // UserID or a combination of Username and DomainID or DomainName are needed. Username string `json:"username"` UserID string `json:"userid"` Password string `json:"password"` // At most one of DomainID and DomainName must be provided if using Username // with Identity V3. Otherwise, either are optional. DomainName string `json:"domain_name"` DomainID string `json:"domain_id"` // The ProjectID and ProjectName fields are optional for the Identity V2 API. // The same fields are known as project_id and project_name in the Identity // V3 API, but are collected as ProjectID and ProjectName here in both cases. // Some providers allow you to specify a ProjectName instead of the ProjectId. // Some require both. Your provider's authentication policies will determine // how these fields influence authentication. // If DomainID or DomainName are provided, they will also apply to ProjectName. // It is not currently possible to authenticate with Username and a Domain // and scope to a Project in a different Domain by using ProjectName. To // accomplish that, the ProjectID will need to be provided as the ProjectID // option. ProjectName string `json:"project_name"` ProjectID string `json:"project_id"` }
OpenStackAuth stores information needed to authenticate to an OpenStack Cloud.
type Scaler ¶
type Scaler struct { Query string `json:"query"` Duration string `json:"duration"` Description string `json:"description"` Interval string `json:"interval"` Actions map[string]*ActionHTTP `json:"actions"` Tags []string `json:"tags"` Active bool `json:"active"` ID string `json:"id,omitempty"` Alert *Alert `json:"alert,omitempty"` Cooldown string `json:"cooldown"` }
Scaler represents a Scaler object
type Silence ¶
type Silence struct { ID string `json:"id"` Name string `json:"name"` Pattern string `json:"pattern"` RegexPattern *regexp.Regexp `json:"-"` TTL string `json:"ttl"` Tags []string `json:"tags"` Description string `json:"description"` CreatedAt time.Time `json:"created_at"` ExpiredAt time.Time `json:"expired_at"` }
Click to show internal directories.
Click to hide internal directories.