nodewatch

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package nodewatch implements Kubernetes node watcher.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeWatcher

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

NodeWatcher defines a NodeWatcher-based node watcher.

func NewNodeWatcher

func NewNodeWatcher(client *kubernetes.Client, nodename string) *NodeWatcher

NewNodeWatcher creates new Kubernetes node watcher.

func (*NodeWatcher) Get

func (r *NodeWatcher) Get() (*corev1.Node, error)

Get returns the Node resource.

func (*NodeWatcher) Nodename

func (r *NodeWatcher) Nodename() string

Nodename returns the watched nodename.

func (*NodeWatcher) Watch

func (r *NodeWatcher) Watch(ctx context.Context) (<-chan struct{}, <-chan error, func(), error)

Watch starts watching Node state and notifies on updates via notify channel.

Jump to

Keyboard shortcuts

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