handlers

package
v0.0.0-...-b380f87 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Map = map[string]interface{}{
	"default":      &Default{},
	"slack":        &slack.Slack{},
	"slackwebhook": &slackwebhook.SlackWebhook{},
	"hipchat":      &hipchat.Hipchat{},
	"mattermost":   &mattermost.Mattermost{},
	"flock":        &flock.Flock{},
	"webhook":      &webhook.Webhook{},
	"ms-teams":     &msteam.MSTeams{},
	"smtp":         &smtpClient.SMTP{},
	"lark":         &lark.Webhook{},
}

Map maps each event handler function to a name for easily lookup

Functions

This section is empty.

Types

type Default

type Default struct {
}

Default handler implements Handler interface, print each event with JSON format

func (*Default) Handle

func (d *Default) Handle(e event.StatemonitorEvent)

Handle handles an event.

func (*Default) Init

func (d *Default) Init(c *config.Config) error

Init initializes handler configuration Do nothing for default handler

type Handler

type Handler interface {
	Init(c *config.Config) error
	Handle(e event.StatemonitorEvent)
}

Handler is implemented by any handler. The Handle method is used to process event

Directories

Path Synopsis
Package smtp implements an email notification handler for statemonitor.
Package smtp implements an email notification handler for statemonitor.

Jump to

Keyboard shortcuts

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