event

package
v0.0.0-...-88f2d9e Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event interface {

	//delete event
	Delete(ctx context.Context, namespace string, name string) error

	//list event
	List(ctx context.Context, namespace string, fieldselector fields.Selector) ([]*v1.Event, error)

	//get event
	Get(ctx context.Context, namespace string, name string) (event *v1.Event, err error)

	//watch event
	WatchEvent(ctx context.Context, handler EventHandlerFuncs)
}

event interface

func NewEvent

func NewEvent(clientset *kubernetes.Clientset, factory informers.SharedInformerFactory) Event

new event

type EventHandlerFuncs

type EventHandlerFuncs struct {
	AddFunc    func(obj *v1.Event)
	UpdateFunc func(oldObj, newObj *v1.Event)
	DeleteFunc func(obj *v1.Event)
}

EventHandlerFuncs

func (EventHandlerFuncs) OnAdd

func (r EventHandlerFuncs) OnAdd(obj interface{})

OnAdd calls AddFunc if it's not nil.

func (EventHandlerFuncs) OnDelete

func (r EventHandlerFuncs) OnDelete(obj interface{})

OnDelete calls DeleteFunc if it's not nil.

func (EventHandlerFuncs) OnUpdate

func (r EventHandlerFuncs) OnUpdate(oldObj, newObj interface{})

OnUpdate calls UpdateFunc if it's not nil.

Jump to

Keyboard shortcuts

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