cache

package
v1.18.5 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

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 Delete

func Delete(c string)

Delete an object from the local cache

func LoadCluster

func LoadCluster() (*apiv1.Cluster, error)

LoadCluster loads a key from the local cache

func LoadEnv

func LoadEnv(c string) ([]string, error)

LoadEnv loads a key from the local cache

func Store

func Store(c string, v interface{})

Store write an 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.

Jump to

Keyboard shortcuts

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