notifier

package
v1.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package notifier fetches notifications from the database and informs the specified remote handler about their existences, inviting the third party to actively query the API about it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterNotifier

func RegisterNotifier(name string, n Notifier)

RegisterNotifier makes a Fetcher available by the provided name. If Register is called twice with the same name or if driver is nil, it panics.

func Run

func Run(config *config.NotifierConfig, datastore database.Datastore, stopper *utils.Stopper)

Run starts the Notifier service.

Types

type Notifier

type Notifier interface {
	// Configure attempts to initialize the notifier with the provided configuration.
	// It returns whether the notifier is enabled or not.
	Configure(*config.NotifierConfig) (bool, error)
	// Send informs the existence of the specified notification.
	Send(notification database.VulnerabilityNotification) error
}

Notifier represents anything that can transmit notifications.

Directories

Path Synopsis
Package notifiers implements several kinds of notifier.Notifier
Package notifiers implements several kinds of notifier.Notifier

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL