controller

package
v1.20.9 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	RunController(stopCh <-chan struct{}) error
	StopController()
}

type EtcdController

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

func NewEtcdController

func NewEtcdController(kconfig, wType string, period int, cache cache.Store, eventFunc *clientGoCache.ResourceEventHandlerFuncs) (*EtcdController, error)

NewEtcdController create controller according Store, Decoder end EventFuncs

func (*EtcdController) AddEvent

func (ctrl *EtcdController) AddEvent(obj interface{})

func (*EtcdController) DeleteEvent

func (ctrl *EtcdController) DeleteEvent(obj interface{})

func (*EtcdController) Resynced

func (ctrl *EtcdController) Resynced() bool

Resynced check controller is under resynced

func (*EtcdController) RunController

func (ctrl *EtcdController) RunController(stopCh <-chan struct{}) error

RunController running controller, create goroutine watch kube-api data

func (*EtcdController) StopController

func (ctrl *EtcdController) StopController()

StopController stop controller event, clean all data

func (*EtcdController) UpdateEvent

func (ctrl *EtcdController) UpdateEvent(oldObj, newObj interface{})

type ZkClient

type ZkClient interface {
	Close()
	Get(path string) ([]byte, *zk.Stat, error)
	GetW(path string) ([]byte, *zk.Stat, <-chan zk.Event, error)
	Children(path string) ([]string, *zk.Stat, error)
	ChildrenW(path string) ([]string, *zk.Stat, <-chan zk.Event, error)
	Exists(path string) (bool, error)
	ExistsW(path string) (bool, *zk.Stat, <-chan zk.Event, error)
}

ZkClient interface to define zk operation interface is only use for dependency injection

type ZkController

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

func NewZkController

func NewZkController(zkHost []string, path string, period int, cache cache.Store, decoder bcsSchedulerUtil.Decoder, eventFunc *clientGoCache.ResourceEventHandlerFuncs) (*ZkController, error)

NewZkController create controller according Store, Decoder end EventFuncs

func (*ZkController) Resynced

func (ctrl *ZkController) Resynced() bool

Resynced check controller is under resynced

func (*ZkController) RunController

func (ctrl *ZkController) RunController(stopCh <-chan struct{}) error

RunController running controller, create goroutine watch zookeeper data

func (*ZkController) StopController

func (ctrl *ZkController) StopController()

StopController stop controller event, clean all data

Jump to

Keyboard shortcuts

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