Documentation ¶
Index ¶
- type Batch
- type Store
- func (s *Store) Batch(ctx context.Context) (storage.Batch, error)
- func (s *Store) Close() (err error)
- func (s *Store) Count(key storage.Key) (int, error)
- func (s *Store) DB() *leveldb.DB
- func (s *Store) Delete(item storage.Item) error
- func (s *Store) Get(item 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(item storage.Item) error
- type Storer
- 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
}
func New ¶
New returns a new store the backed by leveldb. If path == "", the leveldb will run with in memory backend storage.
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 ¶
NewTxStore returns a new TxStore instance backed by the given store.
Click to show internal directories.
Click to hide internal directories.