Documentation ¶
Index ¶
- type DataStore
- func (w *DataStore) Close() error
- func (w *DataStore) Delete(key string) error
- func (w *DataStore) DeleteAll(keys []string) error
- func (w *DataStore) DeleteWithPrefix(prefix string) error
- func (w *DataStore) Get(key string) ([]byte, error)
- func (w *DataStore) GetWithPrefix(prefix string) ([]string, [][]byte, error)
- func (w *DataStore) GetWithRange(from string, to string) ([]string, [][]byte, error)
- func (w *DataStore) Set(key string, value string) error
- func (w *DataStore) SetWithTTL(key string, value string, ttl time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataStore ¶
type DataStore struct {
// contains filtered or unexported fields
}
DataStore wraps a clientv3 datastore.
func (*DataStore) Close ¶
Close closes the underlying datastore. All other operations will fail after calling Close.
func (*DataStore) DeleteAll ¶
DeleteAll deletes all of the given keys and corresponding values in the datastore if they exist.
func (*DataStore) DeleteWithPrefix ¶
DeleteWithPrefix deletes all keys and values with the given prefix.
func (*DataStore) GetWithPrefix ¶
GetWithPrefix gets all keys and values with the given prefix.
func (*DataStore) GetWithRange ¶
GetWithRange gets all keys and values within the given range. Treats this as [from, to) i.e. includes the key from, but excludes the key to.
Click to show internal directories.
Click to hide internal directories.