Documentation ¶
Overview ¶
Package notification exposes functions to dynamically register methods to deliver notifications from the Clair database.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterSender ¶
RegisterSender makes a Sender available by the provided name.
If called twice with the same name, the name is blank, or if the provided Sender is nil, this function panics.
func UnregisterSender ¶
func UnregisterSender(name string)
UnregisterSender removes a Sender with a particular name from the list.
Types ¶
type Config ¶
type Config struct { Attempts int RenotifyInterval time.Duration Params map[string]interface{} `yaml:",inline"` }
Config is the configuration for the Notifier service and its registered notifiers.
type Sender ¶
type Sender interface { // Configure attempts to initialize the notifier with the provided configuration. // It returns whether the notifier is enabled or not. Configure(*Config) (bool, error) // Send informs the existence of the specified notification. Send(notification database.VulnerabilityNotification) error }
Sender represents anything that can transmit notifications.
Click to show internal directories.
Click to hide internal directories.