kubernetes: k8s.io/kubernetes/staging/src/k8s.io/client-go/metadata Index | Files | Directories

package metadata

import "k8s.io/kubernetes/staging/src/k8s.io/client-go/metadata"


Package Files

interface.go metadata.go

func ConfigFor Uses

func ConfigFor(inConfig *rest.Config) *rest.Config

ConfigFor returns a copy of the provided config with the appropriate metadata client defaults set.

type Client Uses

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.

func (*Client) Resource Uses

func (c *Client) Resource(resource schema.GroupVersionResource) Getter

Resource returns an interface that can access cluster or namespace scoped instances of resource.

type Getter Uses

type Getter interface {
    Namespace(string) ResourceInterface

Getter handles both namespaced and non-namespaced resource types consistently.

type Interface Uses

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 Uses

func NewForConfig(inConfig *rest.Config) (Interface, error)

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 Uses

func NewForConfigOrDie(c *rest.Config) Interface

NewForConfigOrDie creates a new metadata client for the given config and panics if there is an error in the config.

type ResourceInterface Uses

type ResourceInterface interface {
    Delete(ctx context.Context, name string, options metav1.DeleteOptions, subresources ...string) error
    DeleteCollection(ctx context.Context, options metav1.DeleteOptions, listOptions metav1.ListOptions) error
    Get(ctx context.Context, name string, options metav1.GetOptions, subresources ...string) (*metav1.PartialObjectMetadata, error)
    List(ctx context.Context, opts metav1.ListOptions) (*metav1.PartialObjectMetadataList, error)
    Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
    Patch(ctx context.Context, 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.



Package metadata imports 13 packages (graph). Updated 2020-05-21. Refresh now. Tools for package owners.