metrics

package
v0.0.0-...-c23e532 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsMetricsAPIAvailable

func IsMetricsAPIAvailable(kubeClient kube.Client) (bool, error)

IsMetricsAPIAvailable checks if the metrics api is available

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is the client we use to retrieve the metrics

func NewMetricsClient

func NewMetricsClient(kubeClient kube.Client) (*Client, error)

NewMetricsClient creates a new metrics client

func (*Client) GetNodeMetrics

func (c *Client) GetNodeMetrics(name, labelSelector string) (*metricsapi.NodeMetricsList, error)

GetNodeMetrics retrieves the node metrics for a given name or labelSelector

func (*Client) GetPodMetrics

func (c *Client) GetPodMetrics(namespace, name, selector string, allNamespaces bool) (*metricsapi.PodMetricsList, error)

GetPodMetrics retrieves the pod metrics for a given namespace and resource name

Jump to

Keyboard shortcuts

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