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