Documentation ¶
Index ¶
- type ContainerInfo
- type ContainerMaxes
- type ContainerResources
- type ContainerStatus
- type ContainerUsage
- type CpuResource
- type KubeClient
- func (k *KubeClient) ClusterCapacity() (capacity api_v1.ResourceList, err error)
- func (k *KubeClient) ContainerResources(namespace string) (resources []*ContainerResources, err error)
- func (k *KubeClient) Containers(namespace string) ([]*ContainerInfo, error)
- func (k *KubeClient) Events(namespace string) ([]api_v1.Event, error)
- func (k *KubeClient) NodeContainerResources(namespace, nodeName string) (resources []*ContainerResources, err error)
- func (k *KubeClient) NodeResources(node *api_v1.Node, namespace string) (*NodeResources, error)
- func (k *KubeClient) Nodes() ([]api_v1.Node, error)
- type MemoryResource
- type NodeResources
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerInfo ¶
type ContainerInfo struct { Name string CpuMax *CpuResource CpuMaxTime time.Time MemoryMax *MemoryResource MemoryMaxTime time.Time *ContainerStatus *ContainerUsage }
type ContainerMaxes ¶
type ContainerMaxes struct { CpuMax *CpuResource CpuMaxTime time.Time MemoryMax *MemoryResource MemoryMaxTime time.Time }
type ContainerResources ¶
type ContainerResources struct { Name string Namespace string CpuReq *CpuResource CpuLimit *CpuResource PercentCpuReq int PercentCpuLimit int MemReq *MemoryResource MemLimit *MemoryResource PercentMemoryReq int PercentMemoryLimit int }
type ContainerStatus ¶
type ContainerUsage ¶
type ContainerUsage struct { Name string CpuUsage *CpuResource MemoryUsage *MemoryResource }
type CpuResource ¶
func NewCpuResource ¶
func NewCpuResource(value int64) *CpuResource
func (*CpuResource) String ¶
func (r *CpuResource) String() string
type KubeClient ¶
type KubeClient struct {
// contains filtered or unexported fields
}
func NewKubeClient ¶
func NewKubeClient( clientset *kubernetes.Clientset, ) *KubeClient
func (*KubeClient) ClusterCapacity ¶
func (k *KubeClient) ClusterCapacity() (capacity api_v1.ResourceList, err error)
Return the total cluster capacity as a ResourceList
func (*KubeClient) ContainerResources ¶
func (k *KubeClient) ContainerResources(namespace string) (resources []*ContainerResources, err error)
Return the resources in use by containers in the cluster as list of ContainerResources
func (*KubeClient) Containers ¶
func (k *KubeClient) Containers(namespace string) ([]*ContainerInfo, error)
func (*KubeClient) Events ¶
func (k *KubeClient) Events(namespace string) ([]api_v1.Event, error)
Returns events from the specified namespace sorted by timestamp
func (*KubeClient) NodeContainerResources ¶
func (k *KubeClient) NodeContainerResources(namespace, nodeName string) (resources []*ContainerResources, err error)
Return a list of container resources for all containers running on the specified node
func (*KubeClient) NodeResources ¶
func (k *KubeClient) NodeResources(node *api_v1.Node, namespace string) (*NodeResources, error)
Return NodeResources struct for the specified object.
type MemoryResource ¶
func NewMemoryResource ¶
func NewMemoryResource(value int64) *MemoryResource
func (*MemoryResource) String ¶
func (r *MemoryResource) String() string
type NodeResources ¶
type NodeResources struct { Name string Pods int CpuUsage *CpuResource CpuCapacity *CpuResource PercentCpu int MemoryUsage *MemoryResource MemoryCapacity *MemoryResource PercentMemory int }
Click to show internal directories.
Click to hide internal directories.