Help us shape the future of Go! Take the 2026 Go Developer Survey

cache

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImpersonationCache

type ImpersonationCache struct {
	// contains filtered or unexported fields
}

func NewImpersonationCache

func NewImpersonationCache() *ImpersonationCache

func (*ImpersonationCache) Get

func (c *ImpersonationCache) Get(ns, name string) (client.Client, bool)

Get returns a cached client if present.

func (*ImpersonationCache) Invalidate

func (c *ImpersonationCache) Invalidate(namespace, name string)

Invalidate removes one entry.

func (*ImpersonationCache) LoadOrCreate

LoadOrCreate returns a cached impersonated client for the given service account, creating and caching it if missing.

func (*ImpersonationCache) Reset

func (c *ImpersonationCache) Reset()

Clear drops all cached clients.

func (*ImpersonationCache) Set

func (c *ImpersonationCache) Set(namespace, name string, cl client.Client)

Set stores a client explicitly (rarely needed).

func (*ImpersonationCache) Stats

func (c *ImpersonationCache) Stats() (entries int)

Stats helps you log cache state.

type Key

type Key struct {
	Namespace string
	Name      string
}

Jump to

Keyboard shortcuts

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