clientwrapper

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientWrapper

type ClientWrapper struct {
	ctrlclient.Client // cached client
	// contains filtered or unexported fields
}

ClientWrapper wraps a cached client and only falls back to live GET when the cached object appears stripped OR is missing required labels. We currently override GET only, but could extend to other methods if needed.

func NewClientWrapper

func NewClientWrapper(cached, live ctrlclient.Client) *ClientWrapper

NewClientWrapper creates a new ClientWrapper instance.

func (*ClientWrapper) Get

Get first tries to get from the cached client, and only falls back to live GET if the cached object appears stripped or is missing required labels. After a live GET, it also ensures the object has the tracking label (best-effort).

Jump to

Keyboard shortcuts

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