Documentation ¶
Index ¶
- func ListObjectNames(mapper apimeta.RESTMapper, client dynamic.Interface, namespace string, ...) ([]string, error)
- func ReferenceFor(mapper apimeta.RESTMapper, name types.NamespacedName, ...) (custom_metrics.ObjectReference, error)
- func ResourceFor(mapper apimeta.RESTMapper, info provider.CustomMetricInfo) (schema.GroupVersionResource, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListObjectNames ¶
func ListObjectNames(mapper apimeta.RESTMapper, client dynamic.Interface, namespace string, selector labels.Selector, info provider.CustomMetricInfo) ([]string, error)
ListObjectNames uses the given dynamic client to list the names of all objects of the given resource matching the given selector. Namespace may be empty if the metric is for a root-scoped resource.
func ReferenceFor ¶
func ReferenceFor(mapper apimeta.RESTMapper, name types.NamespacedName, info provider.CustomMetricInfo) (custom_metrics.ObjectReference, error)
ReferenceFor returns a new ObjectReference for the given group-resource and name. The group-resource is converted into a group-version-kind using the given RESTMapper. You can use this to easily construct an object reference for use in the DescribedObject field of CustomMetricInfo.
func ResourceFor ¶
func ResourceFor(mapper apimeta.RESTMapper, info provider.CustomMetricInfo) (schema.GroupVersionResource, error)
ResourceFor attempts to resolve a single qualified resource for the given metric. You can use this to resolve a particular piece of CustomMetricInfo to the underlying resource that it describes, so that you can list matching objects in the cluster.
Types ¶
This section is empty.