Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type KV ¶
type KV interface { io.Closer // Write writes the object and returns an id or error. Write(key interface{}, value []byte) error // Key returns an id given the key. The id contains type, etc. Key(key interface{}) string // Read loads the object Read(key interface{}) ([]byte, error) // Exists checks for existence Exists(key interface{}) (bool, error) // Delete deletes the object by id Delete(key interface{}) error // Entries returns the entries, unsorted Entries() (<-chan Pair, error) }
KV stores key-value pairs
type Snapshot ¶
type Snapshot interface { io.Closer // Save marshals (encodes) and saves a snapshot of the given object. Save(obj interface{}) error // Load loads a snapshot and marshals (decodes) into the given reference. // If no data is available to unmarshal into the given struct, the fuction returns nil. Load(output interface{}) error }
Snapshot provides means to save and load an object. This is not meant to be a generic k-v store.
Click to show internal directories.
Click to hide internal directories.