nodestream

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: Apache-2.0, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(log logging.Logger, kube kubernetes.Interface, config Config, handler Handler) *informerStream

Types

type Config

type Config struct {
	// NodeName limits the nodestream to a single Node resource with the
	// provided name.
	NodeName string
	// ResyncPeriod is the time between complete resynchronization of the cached
	// resource data.
	ResyncPeriod time.Duration
	// PlatformVersion, when specified, limits the nodestream to Nodes that are
	// labeled with the provided PlatformVersion.
	PlatformVersion marker.PlatformVersion
	// OperatorVersion, when specified, limits the nodestream to Nodes that are
	// labeled with the provided OperatorVersion.
	OperatorVersion marker.OperatorVersion
	// LabelSelectorExtra is a free-form selector appended to the calculated
	// selector.
	LabelSelectorExtra string
	// FieldSelectorExtra is a free-form selector appended to the calculated
	// selector.
	FieldSelectorExtra string
}

type Handler

type Handler interface {
	OnAdd(*v1.Node)
	OnUpdate(*v1.Node, *v1.Node)
	OnDelete(*v1.Node)
}

type HandlerFuncs

type HandlerFuncs struct {
	OnAddFunc    func(*v1.Node)
	OnUpdateFunc func(*v1.Node, *v1.Node)
	OnDeleteFunc func(*v1.Node)
}

func (*HandlerFuncs) OnAdd

func (fn *HandlerFuncs) OnAdd(n *v1.Node)

func (*HandlerFuncs) OnDelete

func (fn *HandlerFuncs) OnDelete(n *v1.Node)

func (*HandlerFuncs) OnUpdate

func (fn *HandlerFuncs) OnUpdate(nOld *v1.Node, nNew *v1.Node)

Jump to

Keyboard shortcuts

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