Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EndpointType ¶
type EndpointType string
EndpointType is the Nomad API endpoint type support for watching.
const ( // Allocations represents the Nomad Allocations API endpoint. Allocations EndpointType = "allocations" // Deployments represents the Nomad Deployments API endpoint. Deployments EndpointType = "deployments" )
type Watcher ¶
type Watcher struct {
EndpointType
// contains filtered or unexported fields
}
Watcher is the main watcher struct which holds all config items for running a watcher.
func NewWatcher ¶
func NewWatcher(cfg *config.NomadConfig, et EndpointType, mChan chan interface{}) (*Watcher, error)
NewWatcher builds a new watcher struct in order to run the nomad-toast watcher task. The message channel is importantly where events are sent for notification.
Click to show internal directories.
Click to hide internal directories.