Documentation ¶
Overview ¶
Package cache contains the constants and functions for reading/writing to the process local cache some specific supported objects
Index ¶
Constants ¶
View Source
const ( // ClusterKey is the key to be used to access the cached cluster ClusterKey = "cluster" // WALArchiveKey is the key to be used to access the cached envs for wal-archive WALArchiveKey = "wal-archive" // WALRestoreKey is the key to be used to access the cached envs for wal-restore WALRestoreKey = "wal-restore" )
Variables ¶
View Source
var ( ErrCacheMiss = errors.New("cache miss") ErrUnsupportedObject = errors.New("unsupported cache object") )
ErrCacheMiss is returned when the requested value is not found in cache, or it is expired.
Functions ¶
func LoadClusterUnsafe ¶ added in v1.19.5
LoadClusterUnsafe retrieves a cluster from the local cache. Warning:
The returned pointer can potentially be accessed concurrently. Only use this function for read-only operations. If you need to modify the cluster, always create a DeepCopy of the returned object before writing to it.
func StoreCluster ¶ added in v1.19.5
StoreCluster write a cluster object into the local cache
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package client contains the constants and functions for reading supported objects from cache or building them in case of cache miss.
|
Package client contains the constants and functions for reading supported objects from cache or building them in case of cache miss. |
Click to show internal directories.
Click to hide internal directories.