notifier

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2017 License: MIT Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FailureMessage

type FailureMessage struct {
	AlertUID          string
	ClusterIdentifier string
	Reason            string
	ResourceID        string
	ResourceType      string
	StatePath         string
}

FailureMessage is the notifier struct that contains all relevant notification information to provide to operators and developers.

type Notifier

type Notifier interface {
	Name() string
	SendNotification(FailureMessage)
}

Notifier is the interface to the Notifiers functions. All notifers are expected to implament this set of functions.

func NewPagerDutyProvider

func NewPagerDutyProvider(c map[string]string) (Notifier, error)

NewPagerDutyProvider creates the PagerDuty notification provider.

func NewProvider

func NewProvider(t string, c map[string]string) (Notifier, error)

NewProvider is the factory entrace to the notifications backends.

type PagerDutyProvider

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

PagerDutyProvider contains the required configuration to send PagerDuty notifications.

func (*PagerDutyProvider) Name

func (p *PagerDutyProvider) Name() string

Name returns the name of the notification endpoint in a lowercase, human readable format.

func (*PagerDutyProvider) SendNotification

func (p *PagerDutyProvider) SendNotification(message FailureMessage)

SendNotification will send a notification to PagerDuty using the Event library call to create a new incident.

Jump to

Keyboard shortcuts

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