provider

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetricsProvider

type MetricsProvider interface {
	PodMetricsProvider
	NodeMetricsProvider
}

MetricsProvider is both a PodMetricsProvider and a NodeMetricsProvider

func NewSinkProvider

func NewSinkProvider() (sink.MetricSink, MetricsProvider)

NewSinkProvider returns a MetricSink that feeds into a MetricsProvider.

type NodeMetricsProvider

type NodeMetricsProvider interface {
	// GetNodeMetrics gets the latest metrics for the given node,
	// returning both the metrics and the associated collection timestamp.
	GetNodeMetrics(node string) (time.Time, corev1.ResourceList, error)
}

NodeMetricsProvider knows how to fetch metrics for a node.

type PodMetricsProvider

type PodMetricsProvider interface {
	// GetContainerMetrics gets the latest metrics for all containers in a pod,
	// returning both the metrics and the associated collection timestamp.
	// It will return an errors.NotFound if the metrics aren't found.
	GetContainerMetrics(pod apitypes.NamespacedName) (time.Time, []metrics.ContainerMetrics, error)
}

PodMetricsProvider knows how to fetch metrics for the containers in a pod.

Jump to

Keyboard shortcuts

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