Documentation
¶
Index ¶
- func Delete(ctx context.Context, keys ...string)
- func First(ctx context.Context, keys ...string) *xtypes.Any
- func Get(ctx context.Context, key string, def ...any) *xtypes.Any
- func Has(ctx context.Context, key string) bool
- func NewCachedReader(inner readOnlyReader, ttl time.Duration) readOnlyReader
- func Set(ctx context.Context, key string, value any)
- func SetExtraReader(reader readOnlyReader)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
Get option value by key If the key does not exist, it returns the default value if provided Otherwise, it returns nil
func NewCachedReader ¶
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 SetExtraReader ¶
func SetExtraReader(reader readOnlyReader)
SetExtraReader sets an extra reader for the global options
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.