nodecount

package
v3.14.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound asserts notFoundError.

Types

type Config

type Config struct {
	K8sClient    k8sclient.Interface
	TenantClient tenantclient.Interface
}

type Interface

type Interface interface {
	// MasterCount is a map of key value pairs where the key is the control plane
	// ID. The map value is a structure holding node information for the
	// corresponding control plane.
	MasterCount(ctx context.Context, obj interface{}) (map[string]Node, error)
	// WorkerCount is a map of key value pairs where the key is the machine deployment
	// ID. The map value is a structure holding node information for the
	// corresponding node pools.
	WorkerCount(ctx context.Context, obj interface{}) (map[string]Node, error)
}

type Node

type Node struct {
	Nodes int32
	Ready int32
}

Node holds the node information for a control plane or a machine deployment

type NodeCount

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

func New

func New(c Config) (*NodeCount, error)

func (*NodeCount) MasterCount

func (nc *NodeCount) MasterCount(ctx context.Context, obj interface{}) (map[string]Node, error)

func (*NodeCount) WorkerCount

func (nc *NodeCount) WorkerCount(ctx context.Context, obj interface{}) (map[string]Node, error)

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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