resourcecachingclient

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2025 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func CreateClient

func CreateClient(ctx context.Context, mgr manager.Manager, cachedObjectTypes []client.Object) (*Client, error)

CreateClient creates a new client layer that sits on top of the provided `underlying` client. This client implements Get for the provided GVKs, using a specific cache.

Other kinds of requests (ie. non-get and non-managed GVKs) are forwarded to the `underlying` client.

Furthermore, cached objects are also available as `source.Source`.

func (*Client) Create

func (c *Client) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error

func (*Client) Get

func (c *Client) Get(ctx context.Context, key client.ObjectKey, out client.Object, opts ...client.GetOption) error

func (*Client) GetSource

func (c *Client) GetSource(ctx context.Context, obj client.Object, h handler.EventHandler) (source.Source, error)

func (*Client) Update

func (c *Client) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error

type NarrowSource

type NarrowSource struct {
	source.Source
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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