Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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) ObjectCreated ¶
func (d *Default) ObjectCreated(obj interface{})
ObjectCreated sends events on object creation
func (*Default) ObjectDeleted ¶
ObjectDeleted sends events on object deletion
func (*Default) ObjectUpdated ¶
func (d *Default) ObjectUpdated(oldObj, newObj interface{})
ObjectUpdated sends events on object updation
func (*Default) TestHandler ¶
func (d *Default) TestHandler()
TestHandler tests the handler configurarion by sending test messages.
type Handler ¶
type Handler interface { Init(c *config.Config, etcdClient etcdv3.Client, ctx context.Context) error ObjectCreated(obj interface{}) ObjectDeleted(name string) ObjectUpdated(oldObj, newObj interface{}) TestHandler() }
Handler is implemented by any handler. The Handle method is used to process event
Click to show internal directories.
Click to hide internal directories.