Documentation ¶
Overview ¶
Package fieldpath supplies methods for extracting fields from objects given a path to a field.
Index ¶
- func ExtractContainerResourceValue(fs *api.ResourceFieldSelector, container *api.Container) (string, error)
- func ExtractFieldPathAsString(obj interface{}, fieldPath string) (string, error)
- func ExtractResourceValueByContainerName(fs *api.ResourceFieldSelector, pod *api.Pod, containerName string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractContainerResourceValue ¶ added in v1.3.0
func ExtractContainerResourceValue(fs *api.ResourceFieldSelector, container *api.Container) (string, error)
ExtractContainerResourceValue extracts the value of a resource in an already known container
func ExtractFieldPathAsString ¶
ExtractFieldPathAsString extracts the field from the given object and returns it as a string. The object must be a pointer to an API type.
Currently, this API is limited to supporting the fieldpaths:
1. metadata.name - The name of an API object 2. metadata.namespace - The namespace of an API object
func ExtractResourceValueByContainerName ¶ added in v1.3.0
func ExtractResourceValueByContainerName(fs *api.ResourceFieldSelector, pod *api.Pod, containerName string) (string, error)
ExtractResourceValueByContainerName extracts the value of a resource by providing container name
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.