listener

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2021 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventArgs added in v1.4.1

type EventArgs struct {
	Event     EventType
	Key       string
	Object    interface{}
	OldObject interface{}
}

type EventHandler added in v1.4.1

type EventHandler interface {
	ListerWatcher() cache.ListerWatcher
	KubeClient() kubernetes.Interface
	Name() string
	ObjectType() runtime.Object
	Handle(ctx context.Context, args EventArgs) error
}

type EventType added in v1.4.1

type EventType int
const (
	AddEvent EventType = iota + 1
	UpdateEvent
	DeleteEvent
)

func (EventType) String added in v1.4.1

func (et EventType) String() string

type Listener added in v1.4.1

type Listener struct {
	LeaseDuration time.Duration
	RenewDeadline time.Duration
	RetryPeriod   time.Duration

	// Controller
	ResyncPeriod time.Duration
	// contains filtered or unexported fields
}

func NewListener added in v1.4.1

func NewListener(handler EventHandler, identity, leaderLock string, threadiness int) *Listener

func (*Listener) Run added in v1.4.1

func (listener *Listener) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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