accountcache

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAccountMappingField added in v1.12.0

func GetAccountMappingField(username, protocol, oidcClientID string) string

GetAccountMappingField returns a composite field name for username -> account mapping. It combines username, protocol and oidcClientID to allow context-specific mappings.

Types

type Manager

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

Manager provides an in-process cache for username -> accountName mapping. It is intentionally small and sharded to reduce lock contention.

func NewManager added in v1.12.0

func NewManager(cfg config.File) *Manager

NewManager creates a new Manager instance.

func (*Manager) Get

func (m *Manager) Get(username, protocol, oidcClientID string) (string, bool)

Get returns a cached account name for the given username (if present).

func (*Manager) Set

func (m *Manager) Set(cfg config.File, username, protocol, oidcClientID, account string)

Set stores the mapping with the configured TTL. If disabled, it is a no-op.

Jump to

Keyboard shortcuts

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