metrics

package
Version: v1.3.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const GroupName = "metrics"

GroupName is the group name use in this package

Variables

View Source
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}

SchemeGroupVersion is group version used to register these objects

Functions

func AddToScheme added in v1.3.0

func AddToScheme(scheme *runtime.Scheme) error

Adds the list of known types to api.Scheme.

func Kind added in v1.3.0

func Kind(kind string) unversioned.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource added in v1.3.0

func Resource(resource string) unversioned.GroupResource

Resource takes an unqualified resource and returns back a Group qualified GroupResource

Types

type Api

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

func NewApi

func NewApi(metricSink *metricsink.MetricSink, podLister *cache.StoreToPodLister, nodeLister *cache.StoreToNodeLister) *Api

func (*Api) Register

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

type ContainerMetrics added in v1.3.0

type ContainerMetrics struct {
	// Container name corresponding to the one from pod.spec.containers.
	Name string `json:"name"`
	// The memory usage is the memory working set.
	Usage api.ResourceList `json:"usage"`
}

resource usage metrics of a container.

type NodeMetrics added in v1.3.0

type NodeMetrics struct {
	unversioned.TypeMeta `json:",inline"`
	api.ObjectMeta       `json:"metadata,omitempty"`

	// The following fields define time interval from which metrics were
	// collected from the interval [Timestamp-Window, Timestamp].
	Timestamp unversioned.Time     `json:"timestamp"`
	Window    unversioned.Duration `json:"window"`

	// The memory usage is the memory working set.
	Usage api.ResourceList `json:"usage"`
}

resource usage metrics of a node.

func (*NodeMetrics) GetObjectKind

func (obj *NodeMetrics) GetObjectKind() unversioned.ObjectKind

type NodeMetricsList added in v1.3.0

type NodeMetricsList struct {
	unversioned.TypeMeta `json:",inline"`
	// Standard list metadata.
	// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
	unversioned.ListMeta `json:"metadata,omitempty"`

	// List of node metrics.
	Items []NodeMetrics `json:"items"`
}

NodeMetricsList is a list of NodeMetrics.

func (*NodeMetricsList) GetObjectKind

func (obj *NodeMetricsList) GetObjectKind() unversioned.ObjectKind

type PodMetrics added in v1.3.0

type PodMetrics struct {
	unversioned.TypeMeta `json:",inline"`
	api.ObjectMeta       `json:"metadata,omitempty"`

	// The following fields define time interval from which metrics were
	// collected from the interval [Timestamp-Window, Timestamp].
	Timestamp unversioned.Time     `json:"timestamp"`
	Window    unversioned.Duration `json:"window"`

	// Metrics for all containers are collected within the same time window.
	Containers []ContainerMetrics `json:"containers"`
}

resource usage metrics of a pod.

func (*PodMetrics) GetObjectKind

func (obj *PodMetrics) GetObjectKind() unversioned.ObjectKind

type PodMetricsList added in v1.3.0

type PodMetricsList struct {
	unversioned.TypeMeta `json:",inline"`
	// Standard list metadata.
	// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
	unversioned.ListMeta `json:"metadata,omitempty"`

	// List of pod metrics.
	Items []PodMetrics `json:"items"`
}

PodMetricsList is a list of PodMetrics.

func (*PodMetricsList) GetObjectKind

func (obj *PodMetricsList) GetObjectKind() unversioned.ObjectKind

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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