Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDisabled = errors.New("state tracking is disabled")
View Source
var ErrIdInvalid = errors.New("id is invalid")
View Source
var ErrNotFound = errors.New("entity not found")
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store[T any] interface { // Is the state usable Usable() bool // Get an entity from the state Get(id string) (*T, error) // Set an entity in the state Set(id string, entity *T) error // Delete an entity from the state Delete(id string) error // Returns the length of the store Length() int }
To allow for alternative storage implementations
store provides an interface for caching and storing state for a Revolt client
Stores manage the entire read/write mechanism of state *but not the actual caching implementation*
Click to show internal directories.
Click to hide internal directories.