notifiers

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Backends = []Notifier{
	&log.Notifier{},
	&http.Notifier{},
}

Backends maps all real, effective Notifiers.

View Source
var Fakes = []Notifier{
	&count.Notifier{},
	&null.Notifier{},
}

Fakes map all test, fake Notifiers.

Functions

This section is empty.

Types

type Composite

type Composite struct {
	Notifiers []Notifier
}

Composite combine and chain several Notifiers, while implementing the Notifier interface itself.

func Init

func Init(notifiers []Notifier) *Composite

Init initialize a Composite structure

func (*Composite) Changed

func (n *Composite) Changed(c *config.KdnConfig, msg string) error

Changed send creation/change events notifications to the Notifier.

func (*Composite) Deleted

func (n *Composite) Deleted(c *config.KdnConfig, msg string) error

Deleted send deletion events notifications to the Notifier.

type Notifier

type Notifier interface {
	Changed(c *config.KdnConfig, msg string) error
	Deleted(c *config.KdnConfig, msg string) error
}

Notifier convey Kubernetes events (creation/changes, deletion) as messages to dedicated backends (like an API endpoint).

Directories

Path Synopsis
Package http notifier convey events notifications as json payloads to a configured HTTP API endpoint.
Package http notifier convey events notifications as json payloads to a configured HTTP API endpoint.
Package null is a no-op Notifier.
Package null is a no-op Notifier.

Jump to

Keyboard shortcuts

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