Documentation
¶
Index ¶
- func CheckDataConsistency[T runtime.Object, U any](ctx context.Context, identity string, lastSyncedResourceVersion string, ...)
- func IsDataConsistencyDetectionForWatchListEnabled() bool
- func SetDataConsistencyDetectionForWatchListEnabledForTest(enabled bool) func()
- type ListFunc
- type RetrieveItemsFunc
- type TransformFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDataConsistency ¶
func CheckDataConsistency[T runtime.Object, U any](ctx context.Context, identity string, lastSyncedResourceVersion string, listFn ListFunc[T], listItemTransformFunc TransformFunc, listOptions metav1.ListOptions, retrieveItemsFn RetrieveItemsFunc[U])
CheckDataConsistency exists solely for testing purposes. we cannot use checkWatchListDataConsistencyIfRequested because it is guarded by an environmental variable. we cannot manipulate the environmental variable because it will affect other tests in this package.
func IsDataConsistencyDetectionForWatchListEnabled ¶
func IsDataConsistencyDetectionForWatchListEnabled() bool
IsDataConsistencyDetectionForWatchListEnabled returns true when the KUBE_WATCHLIST_INCONSISTENCY_DETECTOR environment variable was set during a binary startup.
func SetDataConsistencyDetectionForWatchListEnabledForTest ¶ added in v0.34.3
func SetDataConsistencyDetectionForWatchListEnabledForTest(enabled bool) func()
SetDataConsistencyDetectionForWatchListEnabledForTest allows to enable/disable data consistency detection for testing purposes. It returns a function that restores the original value.
Types ¶
type RetrieveItemsFunc ¶
type RetrieveItemsFunc[U any] func() []U
type TransformFunc ¶ added in v0.34.3
type TransformFunc func(interface{}) (interface{}, error)
Click to show internal directories.
Click to hide internal directories.