clienthelper

package
v0.0.0-...-4d78981 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareTally

func CompareTally(expected map[string]int, actual map[string]int) ([]string, error)

CompareTally will compare the two given tallies and return the differences and an error if they are different.

func TallyCounts

func TallyCounts(tally map[string]int) hookFunc

TallyCounts will update tally with the Kubernetes Kinds that pass through this hook.

func TallyCountsAndKey

func TallyCountsAndKey(tally map[string]int) hookFunc

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 client which allows hooks to be added before and after the client event. Errors returned in the hooks are returned to the caller directly, to simulate issues such as disconnections or errors. Prehooks that cause errors will cause the underlying wrapped client to not be called.

func (*HookingClient) WithPostCreateHook

func (c *HookingClient) WithPostCreateHook(f hookFunc) *HookingClient

func (*HookingClient) WithPostDeleteHook

func (c *HookingClient) WithPostDeleteHook(f hookFunc) *HookingClient

func (*HookingClient) WithPostGetHook

func (c *HookingClient) WithPostGetHook(f getFunc) *HookingClient

func (*HookingClient) WithPostPatchHook

func (c *HookingClient) WithPostPatchHook(f hookFunc) *HookingClient

func (*HookingClient) WithPostUpdateHook

func (c *HookingClient) WithPostUpdateHook(f hookFunc) *HookingClient

func (*HookingClient) WithPreCreateHook

func (c *HookingClient) WithPreCreateHook(f hookFunc) *HookingClient

func (*HookingClient) WithPreDeleteHook

func (c *HookingClient) WithPreDeleteHook(f hookFunc) *HookingClient

func (*HookingClient) WithPreGetHook

func (c *HookingClient) WithPreGetHook(f getFunc) *HookingClient

func (*HookingClient) WithPrePatchHook

func (c *HookingClient) WithPrePatchHook(f hookFunc) *HookingClient

func (*HookingClient) WithPreUpdateHook

func (c *HookingClient) WithPreUpdateHook(f hookFunc) *HookingClient

Jump to

Keyboard shortcuts

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