handler

package
v3.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2019 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Map = map[string]interface{}{
	"default":    &Default{},
	"telemetry":  &telemetry.Handler{},
	"nodeConfig": &nodeconfig.Handler{},
}

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

func (*Default) Init

func (d *Default) Init() error

Init initializes handler configuration Do nothing for default handler

func (*Default) ObjectCreated

func (d *Default) ObjectCreated(obj interface{})

ObjectCreated is called when a CRD object is created

func (*Default) ObjectDeleted

func (d *Default) ObjectDeleted(obj interface{})

ObjectDeleted is called when a CRD object is deleted

func (*Default) ObjectUpdated

func (d *Default) ObjectUpdated(oldObj, newObj interface{})

ObjectUpdated is called when a CRD object is updated

type Handler

type Handler interface {
	//
	Init() error
	//
	ObjectCreated(obj interface{})
	//
	ObjectDeleted(obj interface{})
	//
	ObjectUpdated(oldObj, newObj interface{})
}

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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