Documentation ¶
Index ¶
- type MockStore
- func (s *MockStore) Batch(operations []storage.Operation) error
- func (s *MockStore) Close() error
- func (s *MockStore) Delete(k string) error
- func (s *MockStore) Flush() error
- func (s *MockStore) Get(k string) ([]byte, error)
- func (s *MockStore) GetBulk(k ...string) ([][]byte, error)
- func (s *MockStore) GetTags(key string) ([]storage.Tag, error)
- func (s *MockStore) Put(k string, v []byte, _ ...storage.Tag) error
- func (s *MockStore) PutBulk(keys []string, values [][]byte) error
- func (s *MockStore) Query(expression string, options ...storage.QueryOption) (storage.Iterator, error)
- type Provider
- func (p *Provider) Close() error
- func (p *Provider) GetOpenStores() []storage.Store
- func (p *Provider) GetStoreConfig(name string) (storage.StoreConfiguration, error)
- func (p *Provider) OpenStore(name string) (storage.Store, error)
- func (p *Provider) SetStoreConfig(name string, config storage.StoreConfiguration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockStore ¶
type MockStore struct { Store map[string][]byte ErrPut error ErrGet error // contains filtered or unexported fields }
MockStore represents a mock store.
func (*MockStore) Batch ¶ added in v0.1.6
Batch performs multiple Put and/or Delete operations in order.
func (*MockStore) Flush ¶ added in v0.1.6
Flush forces any queued up Put and/or Delete operations to execute.
type Provider ¶
type Provider struct { Stores map[string]storage.Store Store *MockStore ErrOpenStoreHandle error FailNameSpace string }
Provider mock store provider.
func NewMockStoreProvider ¶
func NewMockStoreProvider() *Provider
NewMockStoreProvider new store provider instance.
func (*Provider) GetOpenStores ¶ added in v0.1.6
GetOpenStores returns all currently open stores.
func (*Provider) GetStoreConfig ¶ added in v0.1.6
func (p *Provider) GetStoreConfig(name string) (storage.StoreConfiguration, error)
GetStoreConfig gets the current store configuration.
func (*Provider) SetStoreConfig ¶ added in v0.1.6
func (p *Provider) SetStoreConfig(name string, config storage.StoreConfiguration) error
SetStoreConfig sets the configuration on a store.
Click to show internal directories.
Click to hide internal directories.