Documentation
¶
Index ¶
- Constants
- type API
- type Sensu
- func (s *Sensu) CreateStash(payload interface{}) (map[string]interface{}, error)
- func (s *Sensu) DeleteAggregate(check string) error
- func (s *Sensu) DeleteCheckResult(check, client string) error
- func (s *Sensu) DeleteClient(client string) error
- func (s *Sensu) DeleteEvent(check, client string) error
- func (s *Sensu) DeleteStash(path string) error
- func (s *Sensu) GetAggregate(check string, age int) ([]interface{}, error)
- func (s *Sensu) GetAggregateIssued(check string, issued string) (map[string]interface{}, error)
- func (s *Sensu) GetAggregates() ([]interface{}, error)
- func (s *Sensu) GetCheck(check string) (map[string]interface{}, error)
- func (s *Sensu) GetChecks() ([]interface{}, error)
- func (s *Sensu) GetClient(client string) (map[string]interface{}, error)
- func (s *Sensu) GetClientHistory(client string) ([]interface{}, error)
- func (s *Sensu) GetClients() ([]interface{}, error)
- func (s *Sensu) GetEvents() ([]interface{}, error)
- func (s *Sensu) GetInfo() (*structs.Info, error)
- func (s *Sensu) GetName() string
- func (s *Sensu) GetStash(path string) (map[string]interface{}, error)
- func (s *Sensu) GetStashes() ([]interface{}, error)
- func (s *Sensu) IssueCheckExecution(payload interface{}) (map[string]interface{}, error)
- func (s *Sensu) Metric(name string) (*structs.SERawMetric, error)
Constants ¶
const DefaultLimit int = 1000
DefaultLimit is used as the default limit parameter for endpoint that supports pagination
const NoLimit int = -1
NoLimit is used as a limit parameter
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sensu ¶
Sensu struct contains the name and all the APIs for a particular datacenter
func (*Sensu) CreateStash ¶
CreateStash creates a stash by posting the provided interface as a JSON encoded payload
func (*Sensu) DeleteAggregate ¶
DeleteAggregate deletes an aggregate using its check name
func (*Sensu) DeleteCheckResult ¶
DeleteCheckResult deletes a check result for a particular client
func (*Sensu) DeleteClient ¶
DeleteClient deletes a client using its name
func (*Sensu) DeleteEvent ¶
DeleteEvent delete an event
func (*Sensu) DeleteStash ¶
DeleteStash deletes a stash using its path
func (*Sensu) GetAggregate ¶
GetAggregate returns a slice of a specific aggregate corresponding to the provided check name
func (*Sensu) GetAggregateIssued ¶
GetAggregateIssued returns a map containing the history of a specific check corresponding to the provided check name and the issued timestamp
func (*Sensu) GetAggregates ¶
GetAggregates returns a slice of all aggregates
func (*Sensu) GetCheck ¶
GetCheck returns a map of a specific check corresponding to the provided check name
func (*Sensu) GetClient ¶
GetClient returns a map of a specific client corresponding to the provided client name
func (*Sensu) GetClientHistory ¶
GetClientHistory returns a slice containing the history of a specific check corresponding to the provided client name
func (*Sensu) GetClients ¶
GetClients returns a slice of all clients
func (*Sensu) GetInfo ¶
GetInfo returns a pointer to a structs.Info struct containing the Sensu version and the transport and Redis connection information
func (*Sensu) GetStash ¶
GetStash returns a map of a specific stash corresponding to the provided path
func (*Sensu) GetStashes ¶
GetStashes returns a slice of all stashes
func (*Sensu) IssueCheckExecution ¶
IssueCheckExecution send a POST request to the /request endpoint in order to issue a check execution request