controller

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 12 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 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

Jump to

Keyboard shortcuts

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