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

package fake

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


Package Files


type FakeMetadataClient Uses

type FakeMetadataClient struct {
    // contains filtered or unexported fields

FakeMetadataClient implements clientset.Interface. Meant to be embedded into a struct to get a default implementation. This makes faking out just the method you want to test easier.

func NewSimpleMetadataClient Uses

func NewSimpleMetadataClient(scheme *runtime.Scheme, objects ...runtime.Object) *FakeMetadataClient

NewSimpleMetadataClient creates a new client that will use the provided scheme and respond with the provided objects when requests are made. It will track actions made to the client which can be checked with GetActions().

func (*FakeMetadataClient) Resource Uses

func (c *FakeMetadataClient) Resource(resource schema.GroupVersionResource) metadata.Getter

Resource returns an interface for accessing the provided resource.

type MetadataClient Uses

type MetadataClient interface {
    CreateFake(obj *metav1.PartialObjectMetadata, opts metav1.CreateOptions, subresources ...string) (*metav1.PartialObjectMetadata, error)
    UpdateFake(obj *metav1.PartialObjectMetadata, opts metav1.UpdateOptions, subresources ...string) (*metav1.PartialObjectMetadata, error)

MetadataClient assists in creating fake objects for use when testing, since metadata.Getter does not expose create

Package fake imports 13 packages (graph). Updated 2020-11-25. Refresh now. Tools for package owners.