Documentation ¶
Index ¶
- func CompareTally(expected map[string]int, actual map[string]int) ([]string, error)
- func TallyCounts(tally map[string]int) hookFunc
- func TallyCountsAndKey(tally map[string]int) hookFunc
- type HookingClient
- func (c *HookingClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
- func (c *HookingClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
- func (c *HookingClient) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
- func (c *HookingClient) Get(ctx context.Context, key client.ObjectKey, obj client.Object) error
- func (c *HookingClient) List(ctx context.Context, obj client.ObjectList, opts ...client.ListOption) error
- func (c *HookingClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, ...) error
- func (c *HookingClient) RESTMapper() meta.RESTMapper
- func (c *HookingClient) Scheme() *runtime.Scheme
- func (c *HookingClient) Status() client.StatusWriter
- func (c *HookingClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
- func (c *HookingClient) Watch(ctx context.Context, list client.ObjectList, opts ...client.ListOption) (watch.Interface, error)
- func (c *HookingClient) WithCreateHook(f hookFunc) *HookingClient
- func (c *HookingClient) WithDeleteHook(f hookFunc) *HookingClient
- func (c *HookingClient) WithGetHook(f getFunc) *HookingClient
- func (c *HookingClient) WithPatchHook(f hookFunc) *HookingClient
- func (c *HookingClient) WithUpdateHook(f hookFunc) *HookingClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareTally ¶
CompareTally will compare the two given tallies and return the differences and an error if they are different.
func TallyCounts ¶
TallyCounts will update tally with the Kubernetes Kinds that pass through this hook.
func TallyCountsAndKey ¶
TallyCountsAndKey will update tally with the Kubernetes Kind, object namespace, and object name (separated by '/') that pass through this hook.
Types ¶
type HookingClient ¶
type HookingClient struct {
// contains filtered or unexported fields
}
func NewHookingClient ¶
func NewHookingClient(c client.WithWatch) *HookingClient
NewHookingClient creates a
func (*HookingClient) Create ¶
func (c *HookingClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
func (*HookingClient) Delete ¶
func (c *HookingClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
func (*HookingClient) DeleteAllOf ¶
func (c *HookingClient) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
See sigs.k8s.io/controller-runtime/pkg/client.Writer.DeleteAllOf
func (*HookingClient) List ¶
func (c *HookingClient) List(ctx context.Context, obj client.ObjectList, opts ...client.ListOption) error
func (*HookingClient) Patch ¶
func (c *HookingClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error
func (*HookingClient) RESTMapper ¶
func (c *HookingClient) RESTMapper() meta.RESTMapper
See sigs.k8s.io/controller-runtime/pkg/client.Client.RESTMapper
func (*HookingClient) Scheme ¶
func (c *HookingClient) Scheme() *runtime.Scheme
func (*HookingClient) Status ¶
func (c *HookingClient) Status() client.StatusWriter
func (*HookingClient) Update ¶
func (c *HookingClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
func (*HookingClient) Watch ¶
func (c *HookingClient) Watch(ctx context.Context, list client.ObjectList, opts ...client.ListOption) (watch.Interface, error)
See sigs.k8s.io/controller-runtime/pkg/client.WithWatch.Watch
func (*HookingClient) WithCreateHook ¶
func (c *HookingClient) WithCreateHook(f hookFunc) *HookingClient
func (*HookingClient) WithDeleteHook ¶
func (c *HookingClient) WithDeleteHook(f hookFunc) *HookingClient
func (*HookingClient) WithGetHook ¶
func (c *HookingClient) WithGetHook(f getFunc) *HookingClient
func (*HookingClient) WithPatchHook ¶
func (c *HookingClient) WithPatchHook(f hookFunc) *HookingClient
func (*HookingClient) WithUpdateHook ¶
func (c *HookingClient) WithUpdateHook(f hookFunc) *HookingClient
Click to show internal directories.
Click to hide internal directories.