Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct { Clientset *kubernetes.Clientset // contains filtered or unexported fields }
Controller calls onChange when the resource changes
func NewController ¶
func NewController(nodeName *string, handler *func(*core_v1.Node)) (*Controller, error)
NewController creates a controller that calls the given function on resource changes
func (*Controller) ListNodes ¶
func (c *Controller) ListNodes() ([]*core_v1.Node, error)
ListNodes returns every node in the cluster
func (*Controller) NodeByName ¶
func (c *Controller) NodeByName(name string) (*core_v1.Node, error)
NodeByName returns the node with the given name, or nil if it doesn't exist
func (*Controller) Run ¶
func (c *Controller) Run(stopCh <-chan struct{})
Run starts the controller loop
Click to show internal directories.
Click to hide internal directories.