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 ¶
func (cw *ClientWrapper) Get(ctx context.Context, key types.NamespacedName, obj ctrlclient.Object, opts ...ctrlclient.GetOption) error
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).
Click to show internal directories.
Click to hide internal directories.