Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInitialization = errors.New("initialization")
ErrInitialization is returned when client initialization fails
var ErrNotFound = errors.New("not found")
ErrNotFound is returned when a resource could not be found
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
Nodes() NodesClient
}
Client is used to interface with a Kubernetes cluster
func NewClientInsideCluster ¶
NewClientInsideCluster initializes a Client for use inside of a cluster
func NewClientOutsideCluster ¶
func NewClientOutsideCluster(opts ...NewClientOutsideClusterOption) (Client, error)
NewClientOutsideCluster initializes a Client for use outside of a cluster. Optional options can be passed to alter default parameters
type NewClientOutsideClusterOption ¶
type NewClientOutsideClusterOption interface {
// contains filtered or unexported methods
}
NewClientOutsideClusterOption can be passed when initializing a Client for use outside a cluster to alter default parameters
func WithConfigLocation ¶
func WithConfigLocation(absolutePath string) NewClientOutsideClusterOption
WithConfigLocation is an option to set a custom Kubernetes config location
type Node ¶
type Node struct { Name string `json:"name"` Hostname string `json:"hostname"` InternalIP string `json:"internal_ip"` Resources NodeResources `json:"resources"` System NodeSystem `json:"system"` }
Node represents a node in the cluster
type NodeResources ¶
type NodeResources struct { // CPU is measured in cores CPU Resource `json:"cpu"` // Memory is measured in bytes Memory Resource `json:"memory"` }
NodeResources is a collection of hardware resources
type NodeSystem ¶
type NodeSystem struct { Arch string `json:"arch"` OS string `json:"os"` KernelVersion string `json:"kernel_version"` OSImage string `json:"os_image"` }
NodeSystem describes system information for a node
type NodesClient ¶
NodesClient exposes access to cluster nodes