resourcecachingclient

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 24 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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