node

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package node defines utilities for the NodeConfiguration

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCrdLabel

func GetCrdLabel(cfg *nodeconfigv1.NodeConfiguration) string

GetCrdLabel concatenates the namespace and name to create a unique label

func Reset

func Reset()

Reset will reset the sharedInformerLock, resulting in a new informer being created the next time resources are being watched. This is mostly for tests. Warning: Calling this during normal runtime will result in unpredictable behaviour, and possibly memory + routine leaks

Types

type ConfigurationClient

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

ConfigurationClient is the client for the NodeConfiguration CRD

func NewForConfig

func NewForConfig(c *rest.Config, namespace string) (*ConfigurationClient, error)

NewForConfig creates a new ConfigurationClient based on the given restConfig and namespace

func (*ConfigurationClient) WatchResources

func (e *ConfigurationClient) WatchResources(addFunc func(obj interface{}), updateFunc func(oldObj, newObj interface{}), deleteFunc func(obj interface{}), stopCh <-chan struct{})

WatchResources creates an informer which watches for new or updated NodeConfigurations and updates the store accordingly This will also trigger the creation and removal of nodes when applicable

Jump to

Keyboard shortcuts

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