v0.0.0-...-386b7fa Latest Latest

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

Go to latest
Published: May 14, 2019 License: Apache-2.0 Imports: 12 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type ContainerMetricsSnapshot

type ContainerMetricsSnapshot struct {
	// ID identifies a specific container those metrics are coming from.
	ID model.ContainerID
	// End time of the measurement interval.
	SnapshotTime time.Time
	// Duration of the measurement interval, which is [SnapshotTime - SnapshotWindow, SnapshotTime].
	SnapshotWindow time.Duration
	// Actual usage of the resources over the measurement interval.
	Usage model.Resources

ContainerMetricsSnapshot contains information about usage of certain container within defined time window.

type MetricsClient

type MetricsClient interface {
	// GetContainersMetrics returns an array of ContainerMetricsSnapshots,
	// representing resource usage for every running container in the cluster
	GetContainersMetrics() ([]*ContainerMetricsSnapshot, error)

MetricsClient provides simple metrics on resources usage on containter level.

func NewMetricsClient

func NewMetricsClient(metricsGetter resourceclient.PodMetricsesGetter) MetricsClient

NewMetricsClient creates new instance of MetricsClient, which is used by recommender. It requires an instance of PodMetricsesGetter, which is used for underlying communication with metrics server.

Jump to

Keyboard shortcuts

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