client

package
v1.18.2 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 12 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

View Source
var (
	LoopFactoryCache = loop.New[loops.EventClient](16)
)

Functions

This section is empty.

Types

type Client

type Client[T meta.Resource] struct {
	// contains filtered or unexported fields
}

func New

func New[T meta.Resource](opts Options[T]) *Client[T]

func (*Client[T]) CacheLoop

func (c *Client[T]) CacheLoop()

func (*Client[T]) Handle

func (c *Client[T]) Handle(ctx context.Context, event loops.EventClient) error

func (*Client[T]) Run

func (c *Client[T]) Run(ctx context.Context) error

type Options

type Options[T meta.Resource] struct {
	EventCh        <-chan *informer.Event[T]
	CancelWatch    context.CancelFunc
	Stream         sender.Interface
	Namespace      string
	KubeClient     client.Client
	ProcessSecrets func(context.Context, *T, string, client.Client) error
	// Filter, when set, drops any event for which it returns false before it is
	// enqueued or streamed. Used to forward only the resources that belong to the
	// connecting app.
	Filter func(T) bool
}

Jump to

Keyboard shortcuts

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