Documentation
¶
Index ¶
- func AsyncUpdate(t *testing.T, db dbp.DB)
- func ListKeys(t *testing.T, db dbp.DB)
- func RoundTrip(t *testing.T, db dbp.DB)
- func SyncUpdate(t *testing.T, db dbp.DB)
- type DB
- func (db *DB) Close() error
- func (db *DB) Delete(namespace, key []byte) error
- func (db *DB) Get(namespace, key []byte) ([]byte, error)
- func (db *DB) ListKeys(namespace []byte, cb dbp.ListCallback) error
- func (db *DB) Set(namespace, key, metadata []byte) error
- func (db *DB) Update(namespace, key []byte, cb dbp.UpdateCallback) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsyncUpdate ¶
AsyncUpdate tests that the given database can Update existing metadata in an asynchronous scenario.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB defines client to store metadata, storing the an in-memory metadata database, used to store encoded metadata directly in an in-memory map.
This implementation is only meant for development and testing purposes, and shouldn't be used for anything serious, given that it will lose all data as soon as it goes out of scope.
func New ¶
func New() *DB
New creates a new in-memory metadata DB, using an nothing but an in-memory map as its storage medium.
This implementation is only meant for development and testing purposes, and shouldn't be used for anything serious, given that it will lose all data as soon as it goes out of scope.