mock

package
v0.0.0-...-062eff5 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface struct {
	EagerPanic bool
	// contains filtered or unexported fields
}

Interface is the mock of apiext.CustomResourceDefinitionInterface.

func NewInterface

func NewInterface() *Interface

NewInterface returns a new mock Interface.

func (*Interface) AddCreateResponse

func (m *Interface) AddCreateResponse(crd *apiext.CustomResourceDefinition, err error)

AddCreateResponse enqueues a new Create response.

func (*Interface) AddDeleteResponse

func (m *Interface) AddDeleteResponse(err error)

AddDeleteResponse enqueues a new Delete response.

func (*Interface) AddListResponse

func (m *Interface) AddListResponse(list *apiext.CustomResourceDefinitionList, err error)

AddListResponse enqueues a new List response.

func (*Interface) AddPanicResponse

func (m *Interface) AddPanicResponse(s string)

AddPanicResponse adds a response to the queue that causes a panic.

func (*Interface) AddUpdateResponse

func (m *Interface) AddUpdateResponse(crd *apiext.CustomResourceDefinition, err error)

AddUpdateResponse enqueues a new Update response.

func (*Interface) AddWatchResponse

func (m *Interface) AddWatchResponse(w watch.Interface, err error)

AddWatchResponse enqueues a new Watch response.

func (*Interface) Close

func (m *Interface) Close()

Close the mock. If there are any pending events or listeners, there will be panic.

func (*Interface) Create

Create is implementation of CustomResourceDefinitionInterface.Create.

func (*Interface) Delete

func (m *Interface) Delete(name string, options *v1.DeleteOptions) error

Delete is implementation of CustomResourceDefinitionInterface.Deelte.

func (*Interface) DeleteCollection

func (m *Interface) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error

DeleteCollection is implementation of CustomResourceDefinitionInterface.DeleteCollection.

func (*Interface) Get

Get is implementation of CustomResourceDefinitionInterface.Get.

func (*Interface) List

List is implementation of CustomResourceDefinitionInterface.List.

func (*Interface) Patch

func (m *Interface) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apiext.CustomResourceDefinition, err error)

Patch is implementation of CustomResourceDefinitionInterface.Patch.

func (*Interface) String

func (m *Interface) String() string

String returns the current inncoming request log as string.

func (*Interface) Update

Update is implementation of CustomResourceDefinitionInterface.Update.

func (*Interface) UpdateStatus

UpdateStatus is implementation of CustomResourceDefinitionInterface.UpdateStatus.

func (*Interface) Watch

func (m *Interface) Watch(opts v1.ListOptions) (watch.Interface, error)

Watch is implementation of CustomResourceDefinitionInterface.Watch.

type Kube

type Kube struct {
	// contains filtered or unexported fields
}

Kube is a mock implementation of galley/pkg/common/Kube

func NewKube

func NewKube() *Kube

NewKube returns a new instance of mock Kube.

func (*Kube) AddResponse

func (k *Kube) AddResponse(r1 interface{}, r2 error)

AddResponse adds a new response to this mock.

func (*Kube) CustomResourceDefinitionInterface

func (k *Kube) CustomResourceDefinitionInterface() (v1beta1.CustomResourceDefinitionInterface, error)

CustomResourceDefinitionInterface implementation

func (*Kube) DynamicInterface

func (k *Kube) DynamicInterface(gv schema.GroupVersion, kind string, listKind string) (dynamic.Interface, error)

DynamicInterface implementation.

func (*Kube) KubernetesInterface

func (k *Kube) KubernetesInterface() (kubernetes.Interface, error)

KubernetesInterface implementation.

type Watch

type Watch struct {
	// contains filtered or unexported fields
}

Watch is a mock implementation of watch.Interface.

func NewWatch

func NewWatch() *Watch

NewWatch returns a new Watch instance.

func (*Watch) ResultChan

func (w *Watch) ResultChan() <-chan watch.Event

ResultChan is an implementation of watch.Interface.ResultChan.

func (*Watch) Send

func (w *Watch) Send(event watch.Event)

Send a watch event through the result channel.

func (*Watch) Stop

func (w *Watch) Stop()

Stop is an implementation of watch.Interface.Watch.

Jump to

Keyboard shortcuts

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