resourcecachingclient

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 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
}

NarrowSource connects a per-object watch (started by Client.GetSource) to a controller workqueue.

func (*NarrowSource) Start

Start registers event handlers on the workqueue; the watch goroutine is started separately. Start must return immediately (controller-runtime v0.20+).

Jump to

Keyboard shortcuts

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