Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface { // Put stores the given set of keys/values. If expiry time is 0 then the data lives forever. Put(keyVal ...*KeyValue) error // Get returns the value for the given key or nil if the key doesn't exist Get(key string) (*Value, error) // Get returns the values for multiple keys. The values are returned in the same order as the keys. GetMultiple(keys ...string) ([]*Value, error) // DeleteExpiredKeys deletes all of the expired keys DeleteExpiredKeys() error // Query returns a set of keys/values for the given query Query(query string) ([]*KeyValue, error) }
DB persists collection data.
type DBProvider ¶
type DBProvider interface { // GetDB return the DB for the given channel, namespace. and collection GetDB(channelID string, coll string, ns string) (DB, error) // Close closes the DB provider Close() }
DBProvider returns the persister for the given namespace/collection
type KeyValue ¶
KeyValue is a struct to store a key value pair
func NewKeyValue ¶
NewKeyValue returns a new key
Click to show internal directories.
Click to hide internal directories.