// NewMemoryKeyValue returns a KeyValue implementation that's backed only // by memory. It's mostly useful for tests and development. func NewMemoryKeyValue() KeyValue { db := memdb.New(nil) return &memKeys{db: db} }
// NewMemoryIndex returns an Index backed only by memory, for use in tests. func NewMemoryIndex() *Index { db := memdb.New(nil) memStorage := &memKeys{db: db} return New(memStorage) }
// NewMemoryStorage returns an index Storage implementation that's backed only // by memory, for use in tests. func NewMemoryStorage() Storage { db := memdb.New(nil) return &memKeys{db: db} }