Documentation ¶
Index ¶
Constants ¶
View Source
const STATE_FN = ".state-"
STATE_FN ...
Variables ¶
View Source
var ( ErrPrevStateNotFound = errors.New("could not find previous state") ErrLocalStateCorrupted = errors.New("local state is corrupted") )
View Source
var ErrCacheAlreadyLocked = errors.New("cache is already locked")
View Source
var ErrCacheNotLocked = errors.New("cache is not locked")
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { Get(serverUUID, db string) (*schema.ImmutableState, error) Set(serverUUID, db string, state *schema.ImmutableState) error Lock(serverUUID string) error Unlock() error }
Cache the cache interface
func NewInMemoryCache ¶ added in v0.7.0
func NewInMemoryCache() Cache
NewInMemoryCache returns a new in-memory cache
type HistoryCache ¶
type HistoryCache interface { Cache Walk(serverUUID string, db string, f func(*schema.ImmutableState) interface{}) ([]interface{}, error) }
HistoryCache the history cache interface
func NewHistoryFileCache ¶
func NewHistoryFileCache(dir string) HistoryCache
NewHistoryFileCache returns a new history file cache
Click to show internal directories.
Click to hide internal directories.