types

package
v0.20.0-alpha8 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2016 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExternalEntityListEntry

type ExternalEntityListEntry struct {
	Name     string `json:"name"`
	CPUUsage uint64 `json:"cpuUsage"`
	MemUsage uint64 `json:"memUsage"`
}

An ExternalEntityListEntry represents the latest CPU and Memory usage of a model entity. A model entity can be a Pod, a Container, a Namespace or a Node.

type ExternalStatBundle

type ExternalStatBundle struct {
	Minute Stats `json:"minute"`
	Hour   Stats `json:"hour"`
	Day    Stats `json:"day"`
}

type LabelDescriptor

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

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 MetricPoint

type MetricPoint struct {
	Timestamp time.Time `json:"timestamp"`
	Value     uint64    `json:"value"`
	// This will be populated only for float custom metrics. In that case
	// "value" will be zero. This is a temporary hack. Overall most likely
	// we will need a new api versioned in the similar way as K8S api.
	FloatValue *float64 `json:"floatValue,omitempty"`
}

type MetricResult

type MetricResult struct {
	Metrics         []MetricPoint `json:"metrics"`
	LatestTimestamp time.Time     `json:"latestTimestamp"`
}

type MetricResultList

type MetricResultList struct {
	Items []MetricResult `json:"items"`
}

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 Stats

type Stats struct {
	Average     uint64 `json:"average"`
	NinetyFifth uint64 `json:"percentile"`
	Max         uint64 `json:"max"`
}

type StatsResponse

type StatsResponse struct {
	// Uptime is in seconds
	Uptime uint64                        `json:"uptime"`
	Stats  map[string]ExternalStatBundle `json:"stats"`
}

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

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