client-go: k8s.io/client-go/dynamic/fake Index | Files

package fake

import "k8s.io/client-go/dynamic/fake"

Package fake provides a fake client interface to arbitrary Kubernetes APIs that exposes common high level operations and exposes common metadata.

Package fake provides a fake client interface to arbitrary Kubernetes APIs that exposes common high level operations and exposes common metadata.

Index

Package Files

client.go client_pool.go

type FakeClient Uses

type FakeClient struct {
    GroupVersion schema.GroupVersion

    *testing.Fake
}

FakeClient is a fake implementation of dynamic.Interface.

func (*FakeClient) GetRateLimiter Uses

func (c *FakeClient) GetRateLimiter() flowcontrol.RateLimiter

GetRateLimiter returns the rate limiter for this client.

func (*FakeClient) ParameterCodec Uses

func (c *FakeClient) ParameterCodec(parameterCodec runtime.ParameterCodec) dynamic.Interface

ParameterCodec returns a client with the provided parameter codec.

func (*FakeClient) Resource Uses

func (c *FakeClient) Resource(resource *metav1.APIResource, namespace string) dynamic.ResourceInterface

Resource returns an API interface to the specified resource for this client's group and version. If resource is not a namespaced resource, then namespace is ignored. The ResourceClient inherits the parameter codec of this client

type FakeClientPool Uses

type FakeClientPool struct {
    testing.Fake
}

FakeClientPool provides a fake implementation of dynamic.ClientPool. It assumes resource GroupVersions are the same as their corresponding kind GroupVersions.

func (*FakeClientPool) ClientForGroupVersionKind Uses

func (p *FakeClientPool) ClientForGroupVersionKind(kind schema.GroupVersionKind) (dynamic.Interface, error)

ClientForGroupVersionKind returns a client configured for the specified groupVersionKind. Kind may be empty.

func (*FakeClientPool) ClientForGroupVersionResource Uses

func (p *FakeClientPool) ClientForGroupVersionResource(resource schema.GroupVersionResource) (dynamic.Interface, error)

ClientForGroupVersionKind returns a client configured for the specified groupVersionResource. Resource may be empty.

type FakeResourceClient Uses

type FakeResourceClient struct {
    Resource  schema.GroupVersionResource
    Kind      schema.GroupVersionKind
    Namespace string

    *testing.Fake
}

FakeResourceClient is a fake implementation of dynamic.ResourceInterface

func (*FakeResourceClient) Create Uses

func (c *FakeResourceClient) Create(inObj *unstructured.Unstructured) (*unstructured.Unstructured, error)

Create creates the provided resource.

func (*FakeResourceClient) Delete Uses

func (c *FakeResourceClient) Delete(name string, opts *metav1.DeleteOptions) error

Delete deletes the resource with the specified name.

func (*FakeResourceClient) DeleteCollection Uses

func (c *FakeResourceClient) DeleteCollection(deleteOptions *metav1.DeleteOptions, listOptions metav1.ListOptions) error

DeleteCollection deletes a collection of objects.

func (*FakeResourceClient) Get Uses

func (c *FakeResourceClient) Get(name string, opts metav1.GetOptions) (*unstructured.Unstructured, error)

Get gets the resource with the specified name.

func (*FakeResourceClient) List Uses

func (c *FakeResourceClient) List(opts metav1.ListOptions) (runtime.Object, error)

List returns a list of objects for this resource.

func (*FakeResourceClient) Patch Uses

func (c *FakeResourceClient) Patch(name string, pt types.PatchType, data []byte) (*unstructured.Unstructured, error)

Patch patches the provided resource.

func (*FakeResourceClient) Update Uses

func (c *FakeResourceClient) Update(inObj *unstructured.Unstructured) (*unstructured.Unstructured, error)

Update updates the provided resource.

func (*FakeResourceClient) Watch Uses

func (c *FakeResourceClient) Watch(opts metav1.ListOptions) (watch.Interface, error)

Watch returns a watch.Interface that watches the resource.

Package fake imports 10 packages (graph). Updated 2018-02-10. Refresh now. Tools for package owners.