Documentation ¶
Index ¶
Constants ¶
View Source
const GroupName = "metrics"
GroupName is the group name use in this package
Variables ¶
View Source
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func Resource ¶
func Resource(resource string) schema.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 v1listers.PodLister, nodeLister v1listers.NodeLister) *Api
type ContainerMetrics ¶
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 ¶
type NodeMetrics struct { metav1.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 metav1.Time `json:"timestamp"` Window metav1.Duration `json:"window"` // The memory usage is the memory working set. Usage api.ResourceList `json:"usage"` }
resource usage metrics of a node.
type NodeMetricsList ¶
type NodeMetricsList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds metav1.ListMeta `json:"metadata,omitempty"` // List of node metrics. Items []NodeMetrics `json:"items"` }
NodeMetricsList is a list of NodeMetrics.
type PodMetrics ¶
type PodMetrics struct { metav1.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 metav1.Time `json:"timestamp"` Window metav1.Duration `json:"window"` // Metrics for all containers are collected within the same time window. Containers []ContainerMetrics `json:"containers"` }
resource usage metrics of a pod.
type PodMetricsList ¶
type PodMetricsList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds metav1.ListMeta `json:"metadata,omitempty"` // List of pod metrics. Items []PodMetrics `json:"items"` }
PodMetricsList is a list of PodMetrics.
Click to show internal directories.
Click to hide internal directories.