Documentation ¶
Index ¶
Constants ¶
View Source
const ( CONTAINER_CPU_METRICS = "container_cpu_user_seconds_total" CONTAINER_MEM_METRICS = "container_memory_usage_bytes" )
View Source
const ( METRIC_POD_LABEL = "pod" METRIC_CONTAINER_LABEL = "container" METRIC_NAME_LABEL = "name" METRICS_NAMESPACE_LABEL = "namespace" METRICS_ID_LABEL = "id" METRICS_IMAGE_LABEL = "image" SORT_BY_CPU = 0 SORT_BY_MEM = 1 SORT_BY_POD = 2 SORT_BY_NAMESPACE = 3 )
View Source
const (
CADVISOR_PATH_TEMPLATE = "/api/v1/nodes/%s/proxy/metrics/cadvisor"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct { Id string Name string Image string PodName string Namespace string // contains filtered or unexported fields }
func (*Container) UpdateMemory ¶
func (*Container) UpdateResources ¶
func (c *Container) UpdateResources(resources *ContainerResources)
type ContainerResources ¶
type Fetcher ¶
type Fetcher struct {
// contains filtered or unexported fields
}
func NewFetcher ¶
func NewFetcher(clientset *kubernetes.Clientset) *Fetcher
func (*Fetcher) GetContainers ¶
func (f *Fetcher) GetContainers() ([]*ContainerResources, error)
func (*Fetcher) GetMetrics ¶
func (f *Fetcher) GetMetrics() ([]*NodeMetrics, error)
type NodeMetrics ¶
Click to show internal directories.
Click to hide internal directories.