Documentation ¶
Index ¶
- func Context() context.Context
- func KVStoreService(ctx context.Context, moduleName string) store.KVStoreService
- func NewMemDB() store.KVStoreWithBatch
- func NewNopLogger() log.Logger
- type MemDB
- func (db *MemDB) Close() error
- func (bt *MemDB) Delete(key []byte) error
- func (bt *MemDB) DeleteSync(key []byte) error
- func (bt *MemDB) Get(key []byte) ([]byte, error)
- func (bt *MemDB) Has(key []byte) (bool, error)
- func (bt *MemDB) Iterator(start, end []byte) (store.Iterator, error)
- func (db *MemDB) NewBatch() store.Batch
- func (db *MemDB) NewBatchWithSize(size int) store.Batch
- func (db *MemDB) Print() error
- func (bt *MemDB) ReverseIterator(start, end []byte) (store.Iterator, error)
- func (bt *MemDB) Set(key, value []byte) error
- func (bt *MemDB) SetSync(key, value []byte) error
- func (db *MemDB) Stats() map[string]string
- type MemEventsService
- type MemKV
- func (bt MemKV) Delete(key []byte) error
- func (bt MemKV) Get(key []byte) ([]byte, error)
- func (bt MemKV) Has(key []byte) (bool, error)
- func (bt MemKV) Iterator(start, end []byte) (store.Iterator, error)
- func (bt MemKV) ReverseIterator(start, end []byte) (store.Iterator, error)
- func (bt MemKV) Set(key, value []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KVStoreService ¶
func KVStoreService(ctx context.Context, moduleName string) store.KVStoreService
func NewNopLogger ¶
NewNopLogger returns a new logger that does nothing.
Types ¶
type MemDB ¶
type MemDB struct {
// contains filtered or unexported fields
}
MemDB is a simple in-memory key-value store with Batch support.
func (*MemDB) DeleteSync ¶
func (*MemDB) NewBatchWithSize ¶
NewBatchWithSize returns a new memDBBatch with the given size.
func (*MemDB) ReverseIterator ¶
type MemEventsService ¶
type MemEventsService struct {
// contains filtered or unexported fields
}
func EventsService ¶
func EventsService(ctx context.Context, moduleName string) MemEventsService
EventsService attaches an event service to the context. Adding an existing module will reset the events.
func (MemEventsService) EventManager ¶
func (e MemEventsService) EventManager(ctx context.Context) event.Manager
func (MemEventsService) GetEvents ¶
func (e MemEventsService) GetEvents(ctx context.Context) []event.Event
func (MemEventsService) GetProtoEvents ¶
func (e MemEventsService) GetProtoEvents(ctx context.Context) []transaction.Msg
type MemKV ¶
type MemKV struct {
// contains filtered or unexported fields
}
MemKV a lightweight memory db
func (MemKV) ReverseIterator ¶
Click to show internal directories.
Click to hide internal directories.