Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client allows callers to retrieve the object metadata for any Kubernetes-compatible API endpoint. The client uses the meta.k8s.io/v1 PartialObjectMetadata resource to more efficiently retrieve just the necessary metadata, but on older servers (Kubernetes 1.14 and before) will retrieve the object and then convert the metadata.
type Getter ¶
type Getter interface { Namespace(string) ResourceInterface ResourceInterface }
Getter handles both namespaced and non-namespaced resource types consistently.
type Interface ¶
type Interface interface {
Resource(resource schema.GroupVersionResource) Getter
}
Interface allows a caller to get the metadata (in the form of PartialObjectMetadata objects) from any Kubernetes compatible resource API.
func NewForConfig ¶
NewForConfig creates a new metadata client that can retrieve object metadata details about any Kubernetes object (core, aggregated, or custom resource based) in the form of PartialObjectMetadata objects, or returns an error.
func NewForConfigOrDie ¶
NewForConfigOrDie creates a new metadata client for the given config and panics if there is an error in the config.
type ResourceInterface ¶
type ResourceInterface interface { Delete(name string, options *metav1.DeleteOptions, subresources ...string) error DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error Get(name string, options metav1.GetOptions, subresources ...string) (*metav1.PartialObjectMetadata, error) List(opts metav1.ListOptions) (*metav1.PartialObjectMetadataList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, options metav1.PatchOptions, subresources ...string) (*metav1.PartialObjectMetadata, error) }
ResourceInterface contains the set of methods that may be invoked on objects by their metadata. Update is not supported by the server, but Patch can be used for the actions Update would handle.