Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Alarm ¶
type Alarm struct { Name string `json:"name"` Actions []string `json:"actions"` Expression string `json:"expression"` Enabled bool `json:"enabled"` Wait time.Duration `json:"wait"` DataSources []string `json:"datasources"` Instance string `json:"instance"` Envs map[string]string `json:"envs"` }
Alarm represents the configuration for the auto scale.
func FindAlarmBy ¶
FindAlarmBy finds alarm by query "q".
func FindAlarmByName ¶
FindAlarmByName find alarm by name.
func ListAlarmsByInstance ¶
ListAlarmsByInstance lists alarms by instance.
func ListAlarmsByToken ¶
ListAlarmsByToken lists alarms by token.
type Event ¶
type Event struct { ID bson.ObjectId `bson:"_id"` StartTime time.Time EndTime time.Time `bson:",omitempty"` Alarm *Alarm Successful bool Error string `bson:",omitempty"` Action *action.Action }
Event represents an auto scale event with the scale metadata.
func EventsByAlarmName ¶
EventsByAlarmName returns a list of events by alarm name
func FindEventsBy ¶
FindEventsBy is an extensible way to find events by query
Click to show internal directories.
Click to hide internal directories.