fake

package
v7.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeClient

type FakeClient struct {
	GroupVersion schema.GroupVersion

	*testing.Fake
}

FakeClient is a fake implementation of dynamic.Interface.

func (*FakeClient) GetRateLimiter

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

GetRateLimiter returns the rate limiter for this client.

func (*FakeClient) ParameterCodec

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

ParameterCodec returns a client with the provided parameter codec.

func (*FakeClient) Resource

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

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

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

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

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

	*testing.Fake
}

FakeResourceClient is a fake implementation of dynamic.ResourceInterface

func (*FakeResourceClient) Create

Create creates the provided resource.

func (*FakeResourceClient) Delete

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

Delete deletes the resource with the specified name.

func (*FakeResourceClient) DeleteCollection

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

DeleteCollection deletes a collection of objects.

func (*FakeResourceClient) Get

Get gets the resource with the specified name.

func (*FakeResourceClient) List

List returns a list of objects for this resource.

func (*FakeResourceClient) Patch

Patch patches the provided resource.

func (*FakeResourceClient) Update

Update updates the provided resource.

func (*FakeResourceClient) Watch

Watch returns a watch.Interface that watches the resource.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL