Documentation ¶
Index ¶
- type Batch
- type Store
- func (s *Store) Batch(ctx context.Context) (storage.Batch, error)
- func (s *Store) Close() error
- func (s *Store) Count(k storage.Key) (int, error)
- func (s *Store) Delete(i storage.Item) error
- func (s *Store) Get(i storage.Item) error
- func (s *Store) GetSize(k storage.Key) (int, error)
- func (s *Store) Has(k storage.Key) (bool, error)
- func (s *Store) Iterate(q storage.Query, fn storage.IterateFn) error
- func (s *Store) Put(i storage.Item) error
- type TxStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Batch ¶
type Batch struct {
// contains filtered or unexported fields
}
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements an in-memory Store. We will use the hashicorp/go-radix implementation. This pkg provides a mutable radix which gives O(k) lookup and ordered iteration.
type TxStore ¶
type TxStore struct { *storage.TxStoreBase // contains filtered or unexported fields }
TxStore is an implementation of in-memory Store where all Store operations are done in a transaction.
func NewTxStore ¶
func NewTxStore(store storage.BatchedStore) *TxStore
NewTxStore returns a new TxStore instance backed by the given store.
Click to show internal directories.
Click to hide internal directories.