handlers

package
v0.0.0-...-c6334f4 Latest Latest
Warning

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

Go to latest
Published: May 13, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Map = map[string]interface{}{
	"default":  &Default{},
	"webhook":  &webhook.Webhook{},
	"ms-teams": &msteam.MSTeams{},
	"smtp":     &smtp.SMTP{},
}

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.Event)

Handle handles an event.

func (*Default) HandleUpdate

func (d *Default) HandleUpdate(e event.Event, old interface{})

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.Event)
	HandleUpdate(e event.Event, old interface{})
}

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 kubewatch.
Package smtp implements an email notification handler for kubewatch.

Jump to

Keyboard shortcuts

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