v1alpha1

package
v1.10.0-RC2 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubeClientBuildOption

type KubeClientBuildOption func(*Kubeclient)

KubeClientBuildOption defines the abstraction to build a kubeclient instance

func WithKubeConfigPath

func WithKubeConfigPath(path string) KubeClientBuildOption

WithKubeConfigPath sets the kubeConfig path against client instance

type Kubeclient

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

Kubeclient enables kubernetes API operations on node instance

func NewKubeClient

func NewKubeClient(opts ...KubeClientBuildOption) *Kubeclient

NewKubeClient returns a new instance of kubeclient meant for node

func (*Kubeclient) Get

func (k *Kubeclient) Get(name string, opts metav1.GetOptions) (*corev1.Node, error)

Get fetches a node object present in kubernetes cluster

func (*Kubeclient) List

func (k *Kubeclient) List(opts metav1.ListOptions) (*corev1.NodeList, error)

List returns a list of nodes instances present in kubernetes cluster

type ListBuilder

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

ListBuilder enables building an instance of NodeList

func NewListBuilder

func NewListBuilder() *ListBuilder

NewListBuilder returns a instance of ListBuilder

func (*ListBuilder) List

func (b *ListBuilder) List() *NodeList

List returns the list of node instances that was built by this builder

func (*ListBuilder) WithAPIList

func (b *ListBuilder) WithAPIList(nodes *v1.NodeList) *ListBuilder

WithAPIList builds the list of node instances based on the provided node list

func (*ListBuilder) WithAPIObject

func (b *ListBuilder) WithAPIObject(nodes ...v1.Node) *ListBuilder

WithAPIObject builds the list of node instances based on node api instances

func (*ListBuilder) WithFilter

func (b *ListBuilder) WithFilter(pred ...Predicate) *ListBuilder

WithFilter add filters on which the node has to be filtered

func (*ListBuilder) WithObject

func (b *ListBuilder) WithObject(nodes ...*node) *ListBuilder

WithObject builds the list of node instances based on the provided node list instance

type NodeList

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

NodeList holds the list of node instances

func (*NodeList) Len

func (n *NodeList) Len() int

Len returns the number of items present in the NodeList

func (*NodeList) ToAPIList

func (n *NodeList) ToAPIList() *v1.NodeList

ToAPIList converts NodeList to API NodeList

type Predicate

type Predicate func(*node) bool

Predicate defines an abstraction to determine conditional checks against the provided node instance

func IsReady

func IsReady() Predicate

IsReady is a Predicate to filter out nodes which are in running state

Jump to

Keyboard shortcuts

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