v1

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2015 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

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

func NewApi

func NewApi(m manager.Manager) *Api

Create a new Api to serve from the specified cache.

func (*Api) Register

func (a *Api) Register(container *restful.Container)

Register the Api on the specified endpoint.

type ClusterInfo added in v0.15.0

type ClusterInfo struct {
	// Cluster Information, links to Namespaces and Nodes
	InfoType
	Namespaces map[string]*NamespaceInfo `json:"namespaces,omitempty"` // key: Namespace Name
	Nodes      map[string]*NodeInfo      `json:"nodes,omitempty"`      // key: Hostname
}

type ContainerInfo added in v0.15.0

type ContainerInfo struct {
	// Container Information
	InfoType
}

type InfoType added in v0.15.0

type InfoType struct {
	// Generic object that contains metrics and labels
	// Embedded in relevant Info Objects
	Metrics map[string][]*MetricTimeseries `json:"metrics,omitempty"` // key: Metric name
	Labels  map[string]string              `json:"labels,omitempty"`  // key: Label
}

type LabelDescriptor added in v0.14.3

type LabelDescriptor struct {
	// Key to use for the label.
	Key string `json:"key,omitempty"`

	// Description of the label.
	Description string `json:"description,omitempty"`
}

type MetricDescriptor added in v0.14.3

type MetricDescriptor struct {
	// The unique name of the metric.
	Name string `json:"name,omitempty"`

	// Description of the metric.
	Description string `json:"description,omitempty"`

	// Descriptor of the labels specific to this metric.
	Labels []LabelDescriptor `json:"labels,omitempty"`

	// Type and value of metric data.
	Type string `json:"type,omitempty"`

	// The type of value returned as part of this metric.
	ValueType string `json:"value_type,omitempty"`

	// The units of the value returned as part of this metric.
	Units string `json:"units,omitempty"`
}

type MetricTimeseries added in v0.15.0

type MetricTimeseries struct {
	Timestamp time.Time `json:"timestamp"`
	Value     uint64    `json:"value"`
}

type NamespaceInfo added in v0.15.0

type NamespaceInfo struct {
	// Namespace Information, links to Pods
	InfoType
	Pods map[string]*PodInfo `json:"pods,omitempty"` // key: Pod Name
}

type NodeInfo added in v0.15.0

type NodeInfo struct {
	// Node Information, links to Pods and Free Containers
	InfoType
	Pods           map[string]*PodInfo       `json:"pods,omitempty"`            // key: Pod Name
	FreeContainers map[string]*ContainerInfo `json:"free_containers,omitempty"` // key: Container Name
}

type PodInfo added in v0.15.0

type PodInfo struct {
	// Pod Information, links to Containers
	InfoType
	UID        string                    `json:"uid,omitempty"`
	Containers map[string]*ContainerInfo `json:"containers,omitempty"` // key: Container Name
}

type Point

type Point struct {
	// The start and end time for which this data is representative.
	Start time.Time `json:"start"`
	End   time.Time `json:"end"`

	// Labels specific to this data point.
	Labels map[string]string `json:"labels,omitempty"`

	// The value of the metric.
	Value interface{} `json:"value"`
}

Point represent a metric value.

type Timeseries

type Timeseries struct {
	// Map of metric names to their values.
	Metrics map[string][]Point `json:"metrics"`

	// Common labels for all metrics.
	Labels map[string]string `json:"labels,omitempty"`
}

Timeseries represents a set of metrics for the same target object (typically a container).

type TimeseriesSchema added in v0.14.3

type TimeseriesSchema struct {
	// All the metrics handled by heapster.
	Metrics []MetricDescriptor `json:"metrics,omitempty"`
	// Labels that are common to all metrics.
	CommonLabels []LabelDescriptor `json:"common_labels,omitempty"`
	// Labels that are present only for containers in pods.
	// A container metric belongs to a pod is "pod_name" label is set.
	PodLabels []LabelDescriptor `json:"pod_labels,omitempty"`
}

TimeseriesSchema represents all the metrics and labels.

Jump to

Keyboard shortcuts

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