nodes

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

ErrNotFound is returned when entry hasn't been found on the cache.

Functions

func Add added in v0.7.0

func Add(mgr manager.Manager) error

Add creates a new Nodes Controller and adds it to the Manager. The Manager will set fields on the Controller and Start it when the Manager is Started.

Types

type Cache added in v0.7.0

type Cache struct {
	Obj    *corev1.ConfigMap
	Create bool
	// contains filtered or unexported fields
}

Cache manages information about Nodes.

func (*Cache) Changed added in v0.7.0

func (c *Cache) Changed() bool

Changed returns true if changes have been made to the cache instance.

func (*Cache) Delete added in v0.7.0

func (c *Cache) Delete(node string)

Delete removes the node from the cache.

func (*Cache) Get added in v0.7.0

func (c *Cache) Get(node string) (CacheEntry, error)

Get returns the information about node, or error if not found or failed to unmarshall the data.

func (*Cache) Keys added in v0.7.0

func (c *Cache) Keys() []string

Keys returns a list of node names on the cache.

func (*Cache) Set added in v0.7.0

func (c *Cache) Set(node string, entry CacheEntry) error

Set updates the information about node, or error if failed to marshall the data.

type CacheEntry added in v0.7.0

type CacheEntry struct {
	Instance                 string    `json:"instance"`
	IPAddress                string    `json:"ip"`
	LastSeen                 time.Time `json:"seen"`
	LastMarkedForTermination time.Time `json:"marked"`
}

CacheEntry constains information about a Node.

type ReconcileNodes added in v0.7.0

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

func (*ReconcileNodes) Start added in v0.7.0

func (r *ReconcileNodes) Start(stop <-chan struct{}) error

Start starts the Nodes Reconciler, and will block until a stop signal is sent.

Jump to

Keyboard shortcuts

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