k8swatcher

package
v1.9.6 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPPoolHandler

type IPPoolHandler interface {
	SyncIPPool(poolKey string, poolLister crdlisters.IPPoolLister) error
}

IPPoolHandler is an abstract interface of objects which receive notifications about ippool object changes.

type IPPoolWatcher

type IPPoolWatcher struct {
	// contains filtered or unexported fields
}

IPPoolWatcher tracks a set of ippool configurations.

func NewIPPoolWatcher

func NewIPPoolWatcher(poolInformer crdinformers.IPPoolInformer, resyncPeriod time.Duration) *IPPoolWatcher

NewIPPoolWatcher creates a new IPPoolWatcher.

func (*IPPoolWatcher) RegisterEventHandler

func (c *IPPoolWatcher) RegisterEventHandler(handler IPPoolHandler)

RegisterEventHandler registers a handler which is called on every ipool change.

func (*IPPoolWatcher) Run

func (c *IPPoolWatcher) Run(workers int, stopCh <-chan struct{})

Run starts the goroutine responsible for calling registered handlers.

func (*IPPoolWatcher) SyncCache added in v1.8.6

func (c *IPPoolWatcher) SyncCache(stopCh <-chan struct{}) bool

SyncCahe wait cache sync ready

type NodeHandler

type NodeHandler interface {
	SyncNode(nodeKey string, nodeLister corelisters.NodeLister) error
}

NodeHandler is an abstract interface of objects which receive notifications about node object changes.

type NodeWatcher

type NodeWatcher struct {
	// contains filtered or unexported fields
}

NodeWatcher tracks a set of node events.

func NewNodeWatcher

func NewNodeWatcher(nodeInformer coreinformers.NodeInformer, resyncPeriod time.Duration) *NodeWatcher

NewNodeWatcher creates a new NodeWatcher.

func (*NodeWatcher) RegisterEventHandler

func (c *NodeWatcher) RegisterEventHandler(handler NodeHandler)

RegisterEventHandler registers a handler which is called on every node change.

func (*NodeWatcher) Run

func (c *NodeWatcher) Run(workers int, stopCh <-chan struct{})

Run starts the goroutine responsible for calling registered handlers.

func (*NodeWatcher) SyncCache added in v1.8.6

func (c *NodeWatcher) SyncCache(stopCh <-chan struct{}) error

Jump to

Keyboard shortcuts

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