Documentation ¶
Index ¶
- type FakeClientWrapper
- func (w *FakeClientWrapper) Create(ctx context.Context, obj runtime.Object, opts ...client.CreateOption) error
- func (w *FakeClientWrapper) Delete(ctx context.Context, obj runtime.Object, opts ...client.DeleteOption) error
- func (w *FakeClientWrapper) DeleteAllOf(ctx context.Context, obj runtime.Object, opts ...client.DeleteAllOfOption) error
- func (w *FakeClientWrapper) Get(ctx context.Context, key client.ObjectKey, obj runtime.Object) error
- func (w *FakeClientWrapper) List(ctx context.Context, list runtime.Object, opts ...client.ListOption) error
- func (w *FakeClientWrapper) Patch(ctx context.Context, obj runtime.Object, patch client.Patch, ...) error
- func (w *FakeClientWrapper) Status() client.StatusWriter
- func (w *FakeClientWrapper) Update(ctx context.Context, obj runtime.Object, opts ...client.UpdateOption) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeClientWrapper ¶
type FakeClientWrapper struct { // Set these functions if you want to override the default fakeClient behavior GetFunc func(ctx context.Context, key client.ObjectKey, obj runtime.Object) error CreateFunc func(ctx context.Context, obj runtime.Object, opts ...client.CreateOption) error UpdateFunc func(ctx context.Context, obj runtime.Object, opts ...client.UpdateOption) error DeleteFunc func(ctx context.Context, obj runtime.Object, opts ...client.DeleteOption) error ListFunc func(ctx context.Context, list runtime.Object, opts ...client.ListOption) error // contains filtered or unexported fields }
FakeClientWrapper allows functions to be replaced for fault injection
func NewFakeClientWrapper ¶
func NewFakeClientWrapper(fakeClient client.Client) *FakeClientWrapper
NewFakeClientWrapper creates a FakeClientWrapper
func (*FakeClientWrapper) Create ¶
func (w *FakeClientWrapper) Create(ctx context.Context, obj runtime.Object, opts ...client.CreateOption) error
Create saves the object obj in the Kubernetes cluster.
func (*FakeClientWrapper) Delete ¶
func (w *FakeClientWrapper) Delete(ctx context.Context, obj runtime.Object, opts ...client.DeleteOption) error
Delete deletes the given obj from Kubernetes cluster.
func (*FakeClientWrapper) DeleteAllOf ¶
func (w *FakeClientWrapper) DeleteAllOf(ctx context.Context, obj runtime.Object, opts ...client.DeleteAllOfOption) error
DeleteAllOf deletes all objects of the given type matching the given options.
func (*FakeClientWrapper) Get ¶
func (w *FakeClientWrapper) Get(ctx context.Context, key client.ObjectKey, obj runtime.Object) error
Get retrieves an obj for the given object key from the Kubernetes Cluster.
func (*FakeClientWrapper) List ¶
func (w *FakeClientWrapper) List(ctx context.Context, list runtime.Object, opts ...client.ListOption) error
List retrieves list of objects for a given namespace and list options.
func (*FakeClientWrapper) Patch ¶
func (w *FakeClientWrapper) Patch(ctx context.Context, obj runtime.Object, patch client.Patch, opts ...client.PatchOption) error
Patch patches the given obj in the Kubernetes cluster.
func (*FakeClientWrapper) Status ¶
func (w *FakeClientWrapper) Status() client.StatusWriter
Status returns a StatusWriter which knows how to update status subresource of a Kubernetes object.
func (*FakeClientWrapper) Update ¶
func (w *FakeClientWrapper) Update(ctx context.Context, obj runtime.Object, opts ...client.UpdateOption) error
Update updates the given obj in the Kubernetes cluster.