Documentation ¶
Index ¶
- type Client
- func (f Client) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
- func (f Client) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
- func (f Client) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
- func (f Client) Get(ctx context.Context, key client.ObjectKey, obj client.Object) error
- func (f Client) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
- func (f Client) Patch(ctx context.Context, obj client.Object, patch client.Patch, ...) error
- func (f Client) RESTMapper() meta.RESTMapper
- func (f Client) Scheme() *runtime.Scheme
- func (f Client) Status() client.StatusWriter
- func (f Client) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Objects map[storageKey]runtime.Object // contains filtered or unexported fields }
Client is a fake k8s client
func NewFakeClient ¶
NewFakeClient initializes and returns new fake k8s client
func (Client) DeleteAllOf ¶
func (f Client) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
DeleteAllOf deletes all objects of the given type matching the given options
func (Client) List ¶
func (f Client) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
List list all requested items in fake cluster
func (Client) Patch ¶
func (f Client) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error
Patch patches the given obj in the Kubernetes cluster
func (Client) RESTMapper ¶
func (f Client) RESTMapper() meta.RESTMapper
RESTMapper returns the rest this client is using
func (Client) Status ¶
func (f Client) Status() client.StatusWriter
Status knows how to create a client which can update status subresource for kubernetes objects
Click to show internal directories.
Click to hide internal directories.