Documentation
¶
Index ¶
- type Client
- type ClientImpl
- func (c *ClientImpl) Create(ctx context.Context, obj k8sclient.Object, opts ...CreateOption) error
- func (c *ClientImpl) CreateOrUpdate(ctx context.Context, obj k8sclient.Object, opts ...CreateOrUpdateOption) error
- func (c *ClientImpl) Delete(ctx context.Context, obj k8sclient.Object, opts ...k8sclient.DeleteOption) error
- func (c *ClientImpl) Get(ctx context.Context, key k8sclient.ObjectKey, obj k8sclient.Object) error
- func (c *ClientImpl) List(ctx context.Context, list k8sclient.ObjectList, opts ...k8sclient.ListOption) error
- func (c *ClientImpl) Patch(ctx context.Context, obj k8sclient.Object, patch k8sclient.Patch, ...) error
- func (c *ClientImpl) PatchStatus(ctx context.Context, obj k8sclient.Object, patch k8sclient.Patch, ...) error
- func (c *ClientImpl) ResilientPatch(ctx context.Context, obj k8sclient.Object, resilient *ResilientPatch, ...) error
- func (c *ClientImpl) ResilientPatchStatus(ctx context.Context, obj k8sclient.Object, resilient *ResilientPatch, ...) error
- func (c *ClientImpl) Update(ctx context.Context, obj k8sclient.Object, opts ...UpdateOption) error
- func (c *ClientImpl) UpdateStatus(ctx context.Context, obj k8sclient.Object, opts ...k8sclient.UpdateOption) error
- type CreateOption
- type CreateOrUpdateOption
- type GlobalConfig
- type PatchOption
- type ResilientPatch
- type UpdateOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
Get(ctx context.Context, key k8sclient.ObjectKey, obj k8sclient.Object) error
List(ctx context.Context, list k8sclient.ObjectList, opts ...k8sclient.ListOption) error
Create(ctx context.Context, obj k8sclient.Object, opts ...CreateOption) error
CreateOrUpdate(ctx context.Context, obj k8sclient.Object, opts ...CreateOrUpdateOption) error
Delete(ctx context.Context, obj k8sclient.Object, opts ...k8sclient.DeleteOption) error
Patch(ctx context.Context, obj k8sclient.Object, patch k8sclient.Patch, opts ...PatchOption) error
PatchStatus(ctx context.Context, obj k8sclient.Object, patch k8sclient.Patch, opts ...PatchOption) error
Update(ctx context.Context, obj k8sclient.Object, opts ...UpdateOption) error
UpdateStatus(ctx context.Context, obj k8sclient.Object, opts ...k8sclient.UpdateOption) error
}
type ClientImpl ¶
type ClientImpl struct {
GlobalConfig GlobalConfig
// contains filtered or unexported fields
}
func New ¶
func New(c k8sclient.Client, gc GlobalConfig) *ClientImpl
func (*ClientImpl) Create ¶
func (c *ClientImpl) Create(ctx context.Context, obj k8sclient.Object, opts ...CreateOption) error
func (*ClientImpl) CreateOrUpdate ¶
func (c *ClientImpl) CreateOrUpdate(ctx context.Context, obj k8sclient.Object, opts ...CreateOrUpdateOption) error
CreateOrUpdate does not support k8sclient.CreateOption or k8sclient.UpdateOption being passed as variadic parameters, if want to use opts use Create or Update methods
func (*ClientImpl) Delete ¶
func (c *ClientImpl) Delete(ctx context.Context, obj k8sclient.Object, opts ...k8sclient.DeleteOption) error
func (*ClientImpl) List ¶
func (c *ClientImpl) List(ctx context.Context, list k8sclient.ObjectList, opts ...k8sclient.ListOption) error
func (*ClientImpl) Patch ¶
func (c *ClientImpl) Patch(ctx context.Context, obj k8sclient.Object, patch k8sclient.Patch, opts ...PatchOption) error
func (*ClientImpl) PatchStatus ¶
func (c *ClientImpl) PatchStatus(ctx context.Context, obj k8sclient.Object, patch k8sclient.Patch, opts ...PatchOption) error
If utilizing resilient option, nil can be passed for patch parameter
func (*ClientImpl) ResilientPatch ¶
func (c *ClientImpl) ResilientPatch(ctx context.Context, obj k8sclient.Object, resilient *ResilientPatch, opts ...k8sclient.PatchOption) error
func (*ClientImpl) ResilientPatchStatus ¶
func (c *ClientImpl) ResilientPatchStatus(ctx context.Context, obj k8sclient.Object, resilient *ResilientPatch, opts ...k8sclient.PatchOption) error
func (*ClientImpl) Update ¶
func (c *ClientImpl) Update(ctx context.Context, obj k8sclient.Object, opts ...UpdateOption) error
NOTE: Currently, Resilient Update is not supported as it requires more specific implementation based on scenario. When possible, should utilize resilient Patch.
func (*ClientImpl) UpdateStatus ¶
func (c *ClientImpl) UpdateStatus(ctx context.Context, obj k8sclient.Object, opts ...k8sclient.UpdateOption) error
NOTE: Currently, Resilient UpdateStatus is not supported as it requires more specific implementation based on scenario. When possible, should utilize resilient PatchStatus.
type CreateOption ¶
type CreateOrUpdateOption ¶
type GlobalConfig ¶
GlobalConfig applies the global configuration defined in operator's config to appropriate kubernetes resources
type PatchOption ¶
type PatchOption struct {
Resilient *ResilientPatch
Opts []k8sclient.PatchOption
}