Documentation ¶
Overview ¶
Package composite provides a k8s client composed of a cached and an uncached client. For Get operations, the cache is used, in case the target object isn't available in the cache, the client will perform a GET call using the uncached client to get the object directly from the k8s api server. For List operations, the client can be configured to use the cache or directly list from the k8s api server. Unlike Get, List does not return error when objects are not found. It returns an empty list. The decision to retry without cache can't be made for List operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
Client is a composite client, composed of cached and uncached clients. It can be used to query objects from cache and fall back to use the raw client and get the object directly from the API server when there's a cache miss.
func (*Client) Get ¶
Get first fetches the object using the cached client. If the object is not found in the cached client, it retries using the uncached client.
func (*Client) List ¶
func (c *Client) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
List lists the objects based on the client configuration. If RawListing is true, it uses the uncached client to list, else it uses the cached client.