heapster

package
Version: v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2018 License: Apache-2.0 Imports: 16 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HeapsterAllInOneDownloadConfig = map[api.ResourceKind]bool{
	api.ResourceKindPod:  true,
	api.ResourceKindNode: false,
}

HeapsterAllInOneDownloadConfig holds config information specifying whether given native Heapster resource type supports list download.

Functions

func CreateHeapsterClient

func CreateHeapsterClient(host string, k8sClient kubernetes.Interface) (
	metricapi.MetricClient, error)

CreateHeapsterClient creates new Heapster client. When heapsterHost param is empty string the function assumes that it is running inside a Kubernetes cluster and connects via service proxy. heapsterHost param is in the format of protocol://address:port, e.g., http://localhost:8002.

func DataPointsFromMetricJSONFormat

func DataPointsFromMetricJSONFormat(raw heapster.MetricResult) (dp metricapi.DataPoints)

DataPointsFromMetricJSONFormat converts all the data points from format used by heapster to our format.

Types

type HeapsterRESTClient

type HeapsterRESTClient interface {
	// Creates a new GET HTTP request to heapster, specified by the path param, to the V1 API
	// endpoint. The path param is without the API prefix, e.g.,
	// /model/namespaces/default/pod-list/foo/metrics/memory-usage
	Get(path string) RequestInterface
	HealthCheck() error
}

HeapsterRESTClient is used to make raw requests to heapster.

type RequestInterface

type RequestInterface interface {
	DoRaw() ([]byte, error)
	AbsPath(segments ...string) *rest.Request
}

RequestInterface is an interface that allows to make operations on pure request object. Separation is done to allow testing.

Jump to

Keyboard shortcuts

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