Documentation
¶
Index ¶
Constants ¶
View Source
const ( Retry = "SenderError" Success = "SenderSuccess" Fail = "SenderFail" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// MaxWorkers controls how many go routines should be dedicated to sending notifications
MaxWorkers int
// MaxDepth controls how many pending sends/results can be awaiting processing
MaxDepth int
}
Config options for the notifier.
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
Message contians the notification to send and a retry counter for delayed retries
type Notification ¶
type Notification interface {
// Host to notify notification
Host() string
// Path on the host
Path() string
// Body of the notification
Body() []byte
}
Notification must be implemented on messages passed through the notifier
type Notifier ¶
type Notifier interface {
Start()
Stop()
Stopped() bool
Send(note Notification)
}
Click to show internal directories.
Click to hide internal directories.