sysops

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(ctx context.Context, keys ...string)

Delete option by key

func First

func First(ctx context.Context, keys ...string) *xtypes.Any

First returns the first option value for the given keys

func Get

func Get(ctx context.Context, key string, def ...any) *xtypes.Any

Get option value by key If the key does not exist, it returns the default value if provided Otherwise, it returns nil

func Has

func Has(ctx context.Context, key string) bool

Has checks if the option with the given key exists

func NewCachedReader

func NewCachedReader(inner readOnlyReader, ttl time.Duration) readOnlyReader

NewCachedReader wraps inner with a TTL cache. ttl <= 0 disables the cache and returns inner as-is. The cache key is the session user, the session account, and the option name. A request with no session uses 0 and 0.

func Set

func Set(ctx context.Context, key string, value any)

Set option value by key

func SetExtraReader

func SetExtraReader(reader readOnlyReader)

SetExtraReader sets an extra reader for the global options

Types

This section is empty.

Jump to

Keyboard shortcuts

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