client

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 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

Overview

Package client provides an extended client that is capable of caching multiple secrets without relying on informers

Index

Constants

View Source
const DefaultTTLSeconds = 10

DefaultTTLSeconds is the default TTL in seconds of cache entries

Variables

This section is empty.

Functions

func NewExtendedClient

func NewExtendedClient(
	baseClient client.Client,
) client.Client

NewExtendedClient returns an extended client capable of caching secrets on the 'Get' operation

Types

type ExtendedClient

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

ExtendedClient is an extended client that is capable of caching multiple secrets without relying on informers

func (*ExtendedClient) Delete

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

Delete behaves like the original Delete method, but on secrets it removes the secret from the cache

func (*ExtendedClient) Get

func (e *ExtendedClient) Get(
	ctx context.Context,
	key client.ObjectKey,
	obj client.Object,
	opts ...client.GetOption,
) error

Get behaves like the original Get method, but uses a cache for secrets

func (*ExtendedClient) Patch

func (e *ExtendedClient) Patch(
	ctx context.Context,
	obj client.Object,
	patch client.Patch,
	opts ...client.PatchOption,
) error

Patch behaves like the original Patch method, but on secrets it removes the secret from the cache

func (*ExtendedClient) Update

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

Update behaves like the original Update method, but on secrets it removes the secret from the cache

Jump to

Keyboard shortcuts

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