alert

package
v0.0.0-...-38f40ef Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2017 License: MPL-2.0 Imports: 2 Imported by: 1

Documentation

Overview

Package alert contains the interfaces, structs, and logic that form the basis of protonds alert plugin subsystem.

Protond currently implements the following alert plugins:

  • Noop
  • A no alert which just noops the event emission.
  • Http
  • An http alert that allows for emitting events to the specified endpoint for alerting.

Index

Constants

View Source
const (
	// NoopAlert defines a noop alert plugin used for testing.
	NoopAlert = "noop"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert interface {
	// Emit should send the event to the configured backend alert sink.
	Emit(event *common.Event)

	// Name returns the name of the alert plugin.
	Name() string
}

Alert is the interface that plugins must adhere to for operation as an alert plugin.

func New

func New(alertPlugin string, config *common.Config, pluginConfig *common.PluginConfig) (Alert, error)

New generates a alert plugin based on the passed in plugin and user defined configuration.

type Noop

type Noop struct {
	// contains filtered or unexported fields
}

Noop is a struct representing the standard input plugin.

func (*Noop) Emit

func (noop *Noop) Emit(event *common.Event)

Emit will return an empty list of events.

func (*Noop) Name

func (noop *Noop) Name() string

Name returns 'Noop'.

Jump to

Keyboard shortcuts

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