Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeepAliveResponse ¶
type KeepAliveResponse struct { ClientInfo SensuClientInfo `json:"-"` KeepAliveConf KeepAlive `json:"-"` Timestamp int64 `json:"timestamp"` Version string `json:"version"` }
func (*KeepAliveResponse) Marshal ¶
func (k *KeepAliveResponse) Marshal() ([]byte, error)
Marshal collects and flattens client & keepalive data and converts to []byte
type SensuClient ¶
type SensuClient struct { Config SensuConfig Transport transport.Transport }
func NewSensuClient ¶
func NewSensuClient(confFile string) (SensuClient, error)
NewSensuClient create a new client based on the confFile
func (*SensuClient) Deregister ¶
func (c *SensuClient) Deregister(client string) error
Deregister remove a client (or source for proxy clients) in sensu via the http api.
func (*SensuClient) PostCheckResult ¶
func (c *SensuClient) PostCheckResult(result check.CheckResult) error
PostCheckResult send out a check result to rabbitmq @todo buffer sending? This might be bad as timestamps & keepalives could be affected
func (*SensuClient) Start ¶
func (c *SensuClient) Start(stopCh chan struct{})
Start starts the client & underlying transport
func (*SensuClient) StartKeepalive ¶
func (c *SensuClient) StartKeepalive(stopCh chan struct{})
StartKeepalive starts the keepalive heartbeats for sens8 itself which registers it in sensu
type SensuClientConfig ¶
type SensuClientConfig struct { SensuClientInfo Keepalive KeepAlive `json:"keepalive,omitempty"` }
type SensuClientInfo ¶
type SensuClientInfo struct { Name string `json:"name"` Address string `json:"address"` Subscriptions []string `json:"subscriptions"` Deregister *bool `json:"deregister"` Deregistration *SensuRegistration `json:"deregistration"` Registration *SensuRegistration `json:"registration"` // contains filtered or unexported fields }
type SensuConfig ¶
type SensuConfig struct { RawClient map[string]interface{} `json:"client,omitempty"` ClientConfig SensuClientConfig `json:"-"` RabbitMQTransport []*rabbitmq.TransportConfig `json:"rabbitmq,omitempty"` Defaults map[string]interface{} `json:"defaults,omitempty"` }
type SensuRegistration ¶
type SensuRegistration struct {
Handler string `json:"handler"`
}
Click to show internal directories.
Click to hide internal directories.