Documentation ¶
Index ¶
- Constants
- type API
- type Sensu
- func (s *Sensu) ClearSilenced(payload interface{}) (map[string]interface{}, error)
- func (s *Sensu) CreateStash(payload interface{}) (map[string]interface{}, error)
- func (s *Sensu) DeleteAggregate(name string) error
- func (s *Sensu) DeleteCheckResult(check, client string) error
- func (s *Sensu) DeleteClient(client, invalidate, expire string) error
- func (s *Sensu) DeleteEvent(check, client string) error
- func (s *Sensu) DeleteStash(path string) error
- func (s *Sensu) GetAggregate(name string) (map[string]interface{}, error)
- func (s *Sensu) GetAggregateChecks(name string) ([]interface{}, error)
- func (s *Sensu) GetAggregateClients(name string) ([]interface{}, error)
- func (s *Sensu) GetAggregateResults(name, severity string) ([]interface{}, error)
- func (s *Sensu) GetAggregates(ctx context.Context) ([]interface{}, error)
- func (s *Sensu) GetCheck(check string) (map[string]interface{}, error)
- func (s *Sensu) GetChecks(ctx context.Context) ([]interface{}, error)
- func (s *Sensu) GetClient(client string) (map[string]interface{}, error)
- func (s *Sensu) GetClientHistory(client string) ([]interface{}, error)
- func (s *Sensu) GetClients(ctx context.Context) ([]interface{}, error)
- func (s *Sensu) GetEvents(ctx context.Context) ([]interface{}, error)
- func (s *Sensu) GetInfo() (*structs.Info, error)
- func (s *Sensu) GetInfoFromAPI(i int) (*structs.Info, error)
- func (s *Sensu) GetName() string
- func (s *Sensu) GetSilenced(ctx context.Context) ([]interface{}, error)
- func (s *Sensu) GetStash(path string) (map[string]interface{}, error)
- func (s *Sensu) GetStashes(ctx context.Context) ([]interface{}, error)
- func (s *Sensu) IssueCheckExecution(payload interface{}) (map[string]interface{}, error)
- func (s *Sensu) Metric(name string) (*structs.SERawMetric, error)
- func (s *Sensu) Silence(payload interface{}) (map[string]interface{}, error)
- func (s *Sensu) UpdateClient(payload interface{}) (map[string]interface{}, 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 API ¶
type API struct { CloseRequest bool DisableKeepAlives bool Insecure bool Pass string Path string Timeout int Tracing bool URL string User string Healthy bool CheckingHealth bool Client http.Client }
API struct contains the details of a specific Sensu API
type Sensu ¶
Sensu struct contains the name and all the APIs for a particular datacenter
func (*Sensu) ClearSilenced ¶
ClearSilenced clears an entry from the silenced registry
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 map of a specific aggregate corresponding to the provided check name
func (*Sensu) GetAggregateChecks ¶
GetAggregateChecks returns a slice of all checks members of an aggregate
func (*Sensu) GetAggregateClients ¶
GetAggregateClients returns a slice of all clients members of an aggregate
func (*Sensu) GetAggregateResults ¶
GetAggregateResults returns a slice of all check result members by severity
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) GetInfoFromAPI ¶
GetInfo returns a pointer to a structs.Info struct containing the Sensu version and the transport and Redis connection information
func (*Sensu) GetSilenced ¶
GetSilenced returns the complete silenced registry
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
func (*Sensu) Metric ¶
func (s *Sensu) Metric(name string) (*structs.SERawMetric, error)
Metric returns the Sensu Enterprise metrics for the clients
func (*Sensu) UpdateClient ¶
UpdateClient updates a client with the provided payload