Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var PerfMetrics = NewPerfMetricsCache()
PerfMetrics stores known metrics from Kubernetes nodes and containers
Functions ¶
func ContainerUID ¶
ContainerUID creates an unique ID for from namespace, pod name and container name
func GetWatcher ¶
func GetWatcher(base mb.BaseMetricSet, resource kubernetes.Resource, nodeScope bool) (kubernetes.Watcher, error)
GetWatcher initializes a kubernetes watcher with the given scope (node or cluster), and resource type
Types ¶
type Enricher ¶
type Enricher interface { // Start will start the Kubernetes watcher on the first call, does nothing on the rest // errors are logged as warning Start() // Stop will stop the Kubernetes watcher Stop() // Enrich the given list of events Enrich([]common.MapStr) }
Enricher takes Kubernetes events and enrich them with k8s metadata
func NewContainerMetadataEnricher ¶
func NewContainerMetadataEnricher( base mb.BaseMetricSet, nodeScope bool) Enricher
NewContainerMetadataEnricher returns an Enricher configured for container events
func NewResourceMetadataEnricher ¶
func NewResourceMetadataEnricher( base mb.BaseMetricSet, res kubernetes.Resource, nodeScope bool) Enricher
NewResourceMetadataEnricher returns an Enricher configured for kubernetes resource events
type PerfMetricsCache ¶
type PerfMetricsCache struct { NodeMemAllocatable *valueMap NodeCoresAllocatable *valueMap ContainerMemLimit *valueMap ContainerCoresLimit *valueMap }
PerfMetricsCache stores known metrics from Kubernetes nodes and containers
func NewPerfMetricsCache ¶
func NewPerfMetricsCache() *PerfMetricsCache
NewPerfMetricsCache initializes and returns a new PerfMetricsCache
Click to show internal directories.
Click to hide internal directories.