clienthelper

package
v0.0.0-...-3a7daba Latest Latest
Warning

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

Go to latest
Published: May 3, 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) 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) 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

func (*HookingClient) WithUpdateHook

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

Jump to

Keyboard shortcuts

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