accountcache

package
v1.11.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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 GetManager

func GetManager() *Manager

GetManager returns the singleton cache manager instance.

func (*Manager) Get

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

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

func (*Manager) Set

func (m *Manager) Set(username, 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