Documentation ¶
Overview ¶
Package custom_metrics defines an API for using custom metrics.
Index ¶
- Constants
- Variables
- func Convert_custom_metrics_ObjectReference_To_v1_ObjectReference(in *ObjectReference, out *v1.ObjectReference, s conversion.Scope) error
- func Convert_v1_ObjectReference_To_custom_metrics_ObjectReference(in *v1.ObjectReference, out *ObjectReference, s conversion.Scope) error
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type MetricIdentifier
- type MetricListOptions
- type MetricValue
- type MetricValueList
- type ObjectReference
Constants ¶
const AllObjects = "*"
allObjects is a wildcard used to select metrics for all objects matching the given label selector
const GroupName = "custom.metrics.k8s.io"
GroupName is the group name use in this package
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func Convert_custom_metrics_ObjectReference_To_v1_ObjectReference ¶
func Convert_custom_metrics_ObjectReference_To_v1_ObjectReference(in *ObjectReference, out *v1.ObjectReference, s conversion.Scope) error
func Convert_v1_ObjectReference_To_custom_metrics_ObjectReference ¶
func Convert_v1_ObjectReference_To_custom_metrics_ObjectReference(in *v1.ObjectReference, out *ObjectReference, s conversion.Scope) error
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns back a Group qualified GroupResource
Types ¶
type MetricIdentifier ¶
type MetricIdentifier struct { // name is the name of the given metric Name string // selector represents the label selector that could be used to select // this metric, and will generally just be the selector passed in to // the query used to fetch this metric. // +optional Selector *metav1.LabelSelector }
func (*MetricIdentifier) DeepCopy ¶
func (in *MetricIdentifier) DeepCopy() *MetricIdentifier
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricIdentifier.
func (*MetricIdentifier) DeepCopyInto ¶
func (in *MetricIdentifier) DeepCopyInto(out *MetricIdentifier)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MetricListOptions ¶
type MetricListOptions struct { metav1.TypeMeta // A selector to restrict the list of returned objects by their labels. // Defaults to everything. // +optional LabelSelector string // A selector to restrict the list of returned metrics by their labels // +optional MetricLabelSelector string }
MetricListOptions is used to select metrics by their label selectors
func (*MetricListOptions) DeepCopy ¶
func (in *MetricListOptions) DeepCopy() *MetricListOptions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricListOptions.
func (*MetricListOptions) DeepCopyInto ¶
func (in *MetricListOptions) DeepCopyInto(out *MetricListOptions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MetricListOptions) DeepCopyObject ¶
func (in *MetricListOptions) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MetricValue ¶
type MetricValue struct { metav1.TypeMeta // a reference to the described object DescribedObject ObjectReference Metric MetricIdentifier // indicates the time at which the metrics were produced Timestamp metav1.Time // indicates the window ([Timestamp-Window, Timestamp]) from // which these metrics were calculated, when returning rate // metrics calculated from cumulative metrics (or zero for // non-calculated instantaneous metrics). WindowSeconds *int64 // the value of the metric for this Value resource.Quantity }
a metric value for some object
func (*MetricValue) DeepCopy ¶
func (in *MetricValue) DeepCopy() *MetricValue
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricValue.
func (*MetricValue) DeepCopyInto ¶
func (in *MetricValue) DeepCopyInto(out *MetricValue)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MetricValue) DeepCopyObject ¶
func (in *MetricValue) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MetricValueList ¶
type MetricValueList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` // the value of the metric across the described objects Items []MetricValue `json:"items"` }
a list of values for a given metric for some set of objects
func (*MetricValueList) DeepCopy ¶
func (in *MetricValueList) DeepCopy() *MetricValueList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricValueList.
func (*MetricValueList) DeepCopyInto ¶
func (in *MetricValueList) DeepCopyInto(out *MetricValueList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MetricValueList) DeepCopyObject ¶
func (in *MetricValueList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ObjectReference ¶
type ObjectReference struct { Kind string Namespace string Name string UID types.UID APIVersion string ResourceVersion string FieldPath string }
ObjectReference contains enough information to let you inspect or modify the referred object.
func (*ObjectReference) DeepCopy ¶
func (in *ObjectReference) DeepCopy() *ObjectReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReference.
func (*ObjectReference) DeepCopyInto ¶
func (in *ObjectReference) DeepCopyInto(out *ObjectReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package install installs the experimental API group, making it available as an option to all of the API encoding/decoding machinery.
|
Package install installs the experimental API group, making it available as an option to all of the API encoding/decoding machinery. |
Package v1beta1 is the v1beta1 version of the custom_metrics API.
|
Package v1beta1 is the v1beta1 version of the custom_metrics API. |
Package v1beta2 is the v1beta2 version of the custom_metrics API.
|
Package v1beta2 is the v1beta2 version of the custom_metrics API. |