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.
Click to show internal directories.
Click to hide internal directories.