notifier

package
v1.0.4-rc0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2018 License: MIT Imports: 5 Imported by: 0

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 NewOpsGenieProvider

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

NewOpsGenieProvider creates the OpsGenie notification provider.

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 OpsGenieProvider

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

OpsGenieProvider contains the required configuration to send OpsGenie notifications.

func (*OpsGenieProvider) Name

func (og *OpsGenieProvider) Name() string

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

func (*OpsGenieProvider) SendNotification

func (og *OpsGenieProvider) SendNotification(message FailureMessage)

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

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