Documentation
¶
Overview ¶
Package kv provides an abstraction of a non-transactional key/value store.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Keyspace ¶
type Keyspace interface { // Get returns the value associated with k. // // If the key does not exist v is empty. Get(ctx context.Context, k []byte) (v []byte, err error) // Has returns true if k is present in the keyspace. Has(ctx context.Context, k []byte) (ok bool, err error) // Set associates a value with k. // // If v is empty, the key is deleted. Set(ctx context.Context, k, v []byte) error // Range invokes fn for each key in the keyspace in an undefined order. Range(ctx context.Context, fn RangeFunc) error // Close closes the keyspace. Close() error }
A Keyspace is an isolated collection of key/value pairs.
Click to show internal directories.
Click to hide internal directories.