Documentation ¶
Overview ¶
Package db contains primitives for storing and indexing data.
Index ¶
- Variables
- type Backuper
- type BadgerDB
- func (b *BadgerDB) Backend() *badger.DB
- func (b *BadgerDB) Backup(w io.Writer, since uint64) (uint64, error)
- func (b *BadgerDB) Delete(key Key) error
- func (b *BadgerDB) ForceValueGC(ctx context.Context)
- func (b *BadgerDB) Get(key Key) (value []byte, err error)
- func (b *BadgerDB) NewIterator(pivot Key, reverse bool) Iterator
- func (b *BadgerDB) Set(key Key, value []byte) error
- func (b *BadgerDB) Stop(ctx context.Context) error
- type DB
- type DBMock
- func (mmDelete *DBMock) Delete(key Key) (err error)
- func (mmDelete *DBMock) DeleteAfterCounter() uint64
- func (mmDelete *DBMock) DeleteBeforeCounter() uint64
- func (mmGet *DBMock) Get(key Key) (value []byte, err error)
- func (mmGet *DBMock) GetAfterCounter() uint64
- func (mmGet *DBMock) GetBeforeCounter() uint64
- func (m *DBMock) MinimockDeleteDone() bool
- func (m *DBMock) MinimockDeleteInspect()
- func (m *DBMock) MinimockFinish()
- func (m *DBMock) MinimockGetDone() bool
- func (m *DBMock) MinimockGetInspect()
- func (m *DBMock) MinimockNewIteratorDone() bool
- func (m *DBMock) MinimockNewIteratorInspect()
- func (m *DBMock) MinimockSetDone() bool
- func (m *DBMock) MinimockSetInspect()
- func (m *DBMock) MinimockWait(timeout mm_time.Duration)
- func (mmNewIterator *DBMock) NewIterator(pivot Key, reverse bool) (i1 Iterator)
- func (mmNewIterator *DBMock) NewIteratorAfterCounter() uint64
- func (mmNewIterator *DBMock) NewIteratorBeforeCounter() uint64
- func (mmSet *DBMock) Set(key Key, value []byte) (err error)
- func (mmSet *DBMock) SetAfterCounter() uint64
- func (mmSet *DBMock) SetBeforeCounter() uint64
- type DBMockDeleteExpectation
- type DBMockDeleteParams
- type DBMockDeleteResults
- type DBMockGetExpectation
- type DBMockGetParams
- type DBMockGetResults
- type DBMockNewIteratorExpectation
- type DBMockNewIteratorParams
- type DBMockNewIteratorResults
- type DBMockSetExpectation
- type DBMockSetParams
- type DBMockSetResults
- type Iterator
- type IteratorMock
- func (mmClose *IteratorMock) Close()
- func (mmClose *IteratorMock) CloseAfterCounter() uint64
- func (mmClose *IteratorMock) CloseBeforeCounter() uint64
- func (mmKey *IteratorMock) Key() (ba1 []byte)
- func (mmKey *IteratorMock) KeyAfterCounter() uint64
- func (mmKey *IteratorMock) KeyBeforeCounter() uint64
- func (m *IteratorMock) MinimockCloseDone() bool
- func (m *IteratorMock) MinimockCloseInspect()
- func (m *IteratorMock) MinimockFinish()
- func (m *IteratorMock) MinimockKeyDone() bool
- func (m *IteratorMock) MinimockKeyInspect()
- func (m *IteratorMock) MinimockNextDone() bool
- func (m *IteratorMock) MinimockNextInspect()
- func (m *IteratorMock) MinimockValueDone() bool
- func (m *IteratorMock) MinimockValueInspect()
- func (m *IteratorMock) MinimockWait(timeout mm_time.Duration)
- func (mmNext *IteratorMock) Next() (b1 bool)
- func (mmNext *IteratorMock) NextAfterCounter() uint64
- func (mmNext *IteratorMock) NextBeforeCounter() uint64
- func (mmValue *IteratorMock) Value() (ba1 []byte, err error)
- func (mmValue *IteratorMock) ValueAfterCounter() uint64
- func (mmValue *IteratorMock) ValueBeforeCounter() uint64
- type IteratorMockCloseExpectation
- type IteratorMockKeyExpectation
- type IteratorMockKeyResults
- type IteratorMockNextExpectation
- type IteratorMockNextResults
- type IteratorMockValueExpectation
- type IteratorMockValueResults
- type JetIndex
- type JetIndexAccessor
- type JetIndexAccessorMock
- func (mmFor *JetIndexAccessorMock) For(jetID insolar.JetID) (m1 map[insolar.ID]struct{})
- func (mmFor *JetIndexAccessorMock) ForAfterCounter() uint64
- func (mmFor *JetIndexAccessorMock) ForBeforeCounter() uint64
- func (m *JetIndexAccessorMock) MinimockFinish()
- func (m *JetIndexAccessorMock) MinimockForDone() bool
- func (m *JetIndexAccessorMock) MinimockForInspect()
- func (m *JetIndexAccessorMock) MinimockWait(timeout mm_time.Duration)
- type JetIndexAccessorMockForExpectation
- type JetIndexAccessorMockForParams
- type JetIndexAccessorMockForResults
- type JetIndexModifier
- type JetIndexModifierMock
- func (mmAdd *JetIndexModifierMock) Add(id insolar.ID, jetID insolar.JetID)
- func (mmAdd *JetIndexModifierMock) AddAfterCounter() uint64
- func (mmAdd *JetIndexModifierMock) AddBeforeCounter() uint64
- func (mmDelete *JetIndexModifierMock) Delete(id insolar.ID, jetID insolar.JetID)
- func (mmDelete *JetIndexModifierMock) DeleteAfterCounter() uint64
- func (mmDelete *JetIndexModifierMock) DeleteBeforeCounter() uint64
- func (m *JetIndexModifierMock) MinimockAddDone() bool
- func (m *JetIndexModifierMock) MinimockAddInspect()
- func (m *JetIndexModifierMock) MinimockDeleteDone() bool
- func (m *JetIndexModifierMock) MinimockDeleteInspect()
- func (m *JetIndexModifierMock) MinimockFinish()
- func (m *JetIndexModifierMock) MinimockWait(timeout mm_time.Duration)
- type JetIndexModifierMockAddExpectation
- type JetIndexModifierMockAddParams
- type JetIndexModifierMockDeleteExpectation
- type JetIndexModifierMockDeleteParams
- type Key
- type Scope
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNotFound is returned when value was not found. ErrNotFound = errors.New("value not found") )
Functions ¶
This section is empty.
Types ¶
type Backuper ¶
type Backuper interface { // Backup does incremental backup starting from 'since' timestamp and write result to 'to' parameter. // It returns a timestamp indicating when the entries were dumped which can be passed into a // later invocation to generate an incremental dump. Backup(to io.Writer, since uint64) (uint64, error) }
Backuper provides interface for making backups
type BadgerDB ¶
type BadgerDB struct {
// contains filtered or unexported fields
}
BadgerDB is a badger DB implementation.
func NewBadgerDB ¶
NewBadgerDB creates new BadgerDB instance. Creates new badger.DB instance with provided working dir and use it as backend for BadgerDB.
func (*BadgerDB) ForceValueGC ¶
ForceValueGC forces badger values garbage collection.
func (*BadgerDB) Get ¶
Get returns value for specified key or an error. A copy of a value will be returned (i.e. getting large value can be long).
func (*BadgerDB) NewIterator ¶
NewIterator returns new Iterator over the store.
type DB ¶
type DB interface { Get(key Key) (value []byte, err error) Set(key Key, value []byte) error Delete(key Key) error NewIterator(pivot Key, reverse bool) Iterator }
DB provides a simple key-value store interface for persisting data. But it is internally ordered ( lexicographically by key bytes ) so if you want you can iterate over store using Iterator interface.
type DBMock ¶
type DBMock struct { DeleteMock mDBMockDelete GetMock mDBMockGet NewIteratorMock mDBMockNewIterator SetMock mDBMockSet // contains filtered or unexported fields }
DBMock implements DB
func (*DBMock) DeleteAfterCounter ¶
DeleteAfterCounter returns a count of finished DBMock.Delete invocations
func (*DBMock) DeleteBeforeCounter ¶
DeleteBeforeCounter returns a count of DBMock.Delete invocations
func (*DBMock) GetAfterCounter ¶
GetAfterCounter returns a count of finished DBMock.Get invocations
func (*DBMock) GetBeforeCounter ¶
GetBeforeCounter returns a count of DBMock.Get invocations
func (*DBMock) MinimockDeleteDone ¶
MinimockDeleteDone returns true if the count of the Delete invocations corresponds the number of defined expectations
func (*DBMock) MinimockDeleteInspect ¶
func (m *DBMock) MinimockDeleteInspect()
MinimockDeleteInspect logs each unmet expectation
func (*DBMock) MinimockFinish ¶
func (m *DBMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*DBMock) MinimockGetDone ¶
MinimockGetDone returns true if the count of the Get invocations corresponds the number of defined expectations
func (*DBMock) MinimockGetInspect ¶
func (m *DBMock) MinimockGetInspect()
MinimockGetInspect logs each unmet expectation
func (*DBMock) MinimockNewIteratorDone ¶
MinimockNewIteratorDone returns true if the count of the NewIterator invocations corresponds the number of defined expectations
func (*DBMock) MinimockNewIteratorInspect ¶
func (m *DBMock) MinimockNewIteratorInspect()
MinimockNewIteratorInspect logs each unmet expectation
func (*DBMock) MinimockSetDone ¶
MinimockSetDone returns true if the count of the Set invocations corresponds the number of defined expectations
func (*DBMock) MinimockSetInspect ¶
func (m *DBMock) MinimockSetInspect()
MinimockSetInspect logs each unmet expectation
func (*DBMock) MinimockWait ¶
MinimockWait waits for all mocked methods to be called the expected number of times
func (*DBMock) NewIterator ¶
NewIterator implements DB
func (*DBMock) NewIteratorAfterCounter ¶
NewIteratorAfterCounter returns a count of finished DBMock.NewIterator invocations
func (*DBMock) NewIteratorBeforeCounter ¶
NewIteratorBeforeCounter returns a count of DBMock.NewIterator invocations
func (*DBMock) SetAfterCounter ¶
SetAfterCounter returns a count of finished DBMock.Set invocations
func (*DBMock) SetBeforeCounter ¶
SetBeforeCounter returns a count of DBMock.Set invocations
type DBMockDeleteExpectation ¶
type DBMockDeleteExpectation struct { Counter uint64 // contains filtered or unexported fields }
DBMockDeleteExpectation specifies expectation struct of the DB.Delete
func (*DBMockDeleteExpectation) Then ¶
func (e *DBMockDeleteExpectation) Then(err error) *DBMock
Then sets up DB.Delete return parameters for the expectation previously defined by the When method
type DBMockDeleteParams ¶
type DBMockDeleteParams struct {
// contains filtered or unexported fields
}
DBMockDeleteParams contains parameters of the DB.Delete
type DBMockDeleteResults ¶
type DBMockDeleteResults struct {
// contains filtered or unexported fields
}
DBMockDeleteResults contains results of the DB.Delete
type DBMockGetExpectation ¶
type DBMockGetExpectation struct { Counter uint64 // contains filtered or unexported fields }
DBMockGetExpectation specifies expectation struct of the DB.Get
type DBMockGetParams ¶
type DBMockGetParams struct {
// contains filtered or unexported fields
}
DBMockGetParams contains parameters of the DB.Get
type DBMockGetResults ¶
type DBMockGetResults struct {
// contains filtered or unexported fields
}
DBMockGetResults contains results of the DB.Get
type DBMockNewIteratorExpectation ¶
type DBMockNewIteratorExpectation struct { Counter uint64 // contains filtered or unexported fields }
DBMockNewIteratorExpectation specifies expectation struct of the DB.NewIterator
func (*DBMockNewIteratorExpectation) Then ¶
func (e *DBMockNewIteratorExpectation) Then(i1 Iterator) *DBMock
Then sets up DB.NewIterator return parameters for the expectation previously defined by the When method
type DBMockNewIteratorParams ¶
type DBMockNewIteratorParams struct {
// contains filtered or unexported fields
}
DBMockNewIteratorParams contains parameters of the DB.NewIterator
type DBMockNewIteratorResults ¶
type DBMockNewIteratorResults struct {
// contains filtered or unexported fields
}
DBMockNewIteratorResults contains results of the DB.NewIterator
type DBMockSetExpectation ¶
type DBMockSetExpectation struct { Counter uint64 // contains filtered or unexported fields }
DBMockSetExpectation specifies expectation struct of the DB.Set
func (*DBMockSetExpectation) Then ¶
func (e *DBMockSetExpectation) Then(err error) *DBMock
Then sets up DB.Set return parameters for the expectation previously defined by the When method
type DBMockSetParams ¶
type DBMockSetParams struct {
// contains filtered or unexported fields
}
DBMockSetParams contains parameters of the DB.Set
type DBMockSetResults ¶
type DBMockSetResults struct {
// contains filtered or unexported fields
}
DBMockSetResults contains results of the DB.Set
type Iterator ¶
type Iterator interface { // Next moves the iterator to the next key-value pair. Next() bool // Close frees resources within the iterator and invalidates it. Close() // Key returns only the second part of the composite key - (ID) without scope id. // Warning: Key is only valid as long as item is valid (until iterator.Next() called), or transaction is valid. // If you need to use it outside its validity, please copy the key. Key() []byte // Value returns value itself (ex: record, drop, blob, etc). // Warning: Value is only valid as long as item is valid (until iterator.Next() called), or transaction is valid. // If you need to use it outside its validity, please copy the value. Value() ([]byte, error) }
Iterator provides an interface for walking through the storage record sequence (where records are sorted lexicographically).
type IteratorMock ¶
type IteratorMock struct { CloseMock mIteratorMockClose KeyMock mIteratorMockKey NextMock mIteratorMockNext ValueMock mIteratorMockValue // contains filtered or unexported fields }
IteratorMock implements Iterator
func NewIteratorMock ¶
func NewIteratorMock(t minimock.Tester) *IteratorMock
NewIteratorMock returns a mock for Iterator
func (*IteratorMock) CloseAfterCounter ¶
func (mmClose *IteratorMock) CloseAfterCounter() uint64
CloseAfterCounter returns a count of finished IteratorMock.Close invocations
func (*IteratorMock) CloseBeforeCounter ¶
func (mmClose *IteratorMock) CloseBeforeCounter() uint64
CloseBeforeCounter returns a count of IteratorMock.Close invocations
func (*IteratorMock) KeyAfterCounter ¶
func (mmKey *IteratorMock) KeyAfterCounter() uint64
KeyAfterCounter returns a count of finished IteratorMock.Key invocations
func (*IteratorMock) KeyBeforeCounter ¶
func (mmKey *IteratorMock) KeyBeforeCounter() uint64
KeyBeforeCounter returns a count of IteratorMock.Key invocations
func (*IteratorMock) MinimockCloseDone ¶
func (m *IteratorMock) MinimockCloseDone() bool
MinimockCloseDone returns true if the count of the Close invocations corresponds the number of defined expectations
func (*IteratorMock) MinimockCloseInspect ¶
func (m *IteratorMock) MinimockCloseInspect()
MinimockCloseInspect logs each unmet expectation
func (*IteratorMock) MinimockFinish ¶
func (m *IteratorMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*IteratorMock) MinimockKeyDone ¶
func (m *IteratorMock) MinimockKeyDone() bool
MinimockKeyDone returns true if the count of the Key invocations corresponds the number of defined expectations
func (*IteratorMock) MinimockKeyInspect ¶
func (m *IteratorMock) MinimockKeyInspect()
MinimockKeyInspect logs each unmet expectation
func (*IteratorMock) MinimockNextDone ¶
func (m *IteratorMock) MinimockNextDone() bool
MinimockNextDone returns true if the count of the Next invocations corresponds the number of defined expectations
func (*IteratorMock) MinimockNextInspect ¶
func (m *IteratorMock) MinimockNextInspect()
MinimockNextInspect logs each unmet expectation
func (*IteratorMock) MinimockValueDone ¶
func (m *IteratorMock) MinimockValueDone() bool
MinimockValueDone returns true if the count of the Value invocations corresponds the number of defined expectations
func (*IteratorMock) MinimockValueInspect ¶
func (m *IteratorMock) MinimockValueInspect()
MinimockValueInspect logs each unmet expectation
func (*IteratorMock) MinimockWait ¶
func (m *IteratorMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
func (*IteratorMock) NextAfterCounter ¶
func (mmNext *IteratorMock) NextAfterCounter() uint64
NextAfterCounter returns a count of finished IteratorMock.Next invocations
func (*IteratorMock) NextBeforeCounter ¶
func (mmNext *IteratorMock) NextBeforeCounter() uint64
NextBeforeCounter returns a count of IteratorMock.Next invocations
func (*IteratorMock) Value ¶
func (mmValue *IteratorMock) Value() (ba1 []byte, err error)
Value implements Iterator
func (*IteratorMock) ValueAfterCounter ¶
func (mmValue *IteratorMock) ValueAfterCounter() uint64
ValueAfterCounter returns a count of finished IteratorMock.Value invocations
func (*IteratorMock) ValueBeforeCounter ¶
func (mmValue *IteratorMock) ValueBeforeCounter() uint64
ValueBeforeCounter returns a count of IteratorMock.Value invocations
type IteratorMockCloseExpectation ¶
type IteratorMockCloseExpectation struct { Counter uint64 // contains filtered or unexported fields }
IteratorMockCloseExpectation specifies expectation struct of the Iterator.Close
type IteratorMockKeyExpectation ¶
type IteratorMockKeyExpectation struct { Counter uint64 // contains filtered or unexported fields }
IteratorMockKeyExpectation specifies expectation struct of the Iterator.Key
type IteratorMockKeyResults ¶
type IteratorMockKeyResults struct {
// contains filtered or unexported fields
}
IteratorMockKeyResults contains results of the Iterator.Key
type IteratorMockNextExpectation ¶
type IteratorMockNextExpectation struct { Counter uint64 // contains filtered or unexported fields }
IteratorMockNextExpectation specifies expectation struct of the Iterator.Next
type IteratorMockNextResults ¶
type IteratorMockNextResults struct {
// contains filtered or unexported fields
}
IteratorMockNextResults contains results of the Iterator.Next
type IteratorMockValueExpectation ¶
type IteratorMockValueExpectation struct { Counter uint64 // contains filtered or unexported fields }
IteratorMockValueExpectation specifies expectation struct of the Iterator.Value
type IteratorMockValueResults ¶
type IteratorMockValueResults struct {
// contains filtered or unexported fields
}
IteratorMockValueResults contains results of the Iterator.Value
type JetIndex ¶
type JetIndex struct {
// contains filtered or unexported fields
}
JetIndex contains methods to implement quick access to data by jet. Indexes are stored in memory. Consider disk implementation for large collections.
func (*JetIndex) Add ¶
Add creates index record for specified id and jet. To remove clean up index, use "Delete" method.
type JetIndexAccessor ¶
JetIndexAccessor is an interface for modifying index records.
type JetIndexAccessorMock ¶
type JetIndexAccessorMock struct { ForMock mJetIndexAccessorMockFor // contains filtered or unexported fields }
JetIndexAccessorMock implements JetIndexAccessor
func NewJetIndexAccessorMock ¶
func NewJetIndexAccessorMock(t minimock.Tester) *JetIndexAccessorMock
NewJetIndexAccessorMock returns a mock for JetIndexAccessor
func (*JetIndexAccessorMock) For ¶
func (mmFor *JetIndexAccessorMock) For(jetID insolar.JetID) (m1 map[insolar.ID]struct { })
For implements JetIndexAccessor
func (*JetIndexAccessorMock) ForAfterCounter ¶
func (mmFor *JetIndexAccessorMock) ForAfterCounter() uint64
ForAfterCounter returns a count of finished JetIndexAccessorMock.For invocations
func (*JetIndexAccessorMock) ForBeforeCounter ¶
func (mmFor *JetIndexAccessorMock) ForBeforeCounter() uint64
ForBeforeCounter returns a count of JetIndexAccessorMock.For invocations
func (*JetIndexAccessorMock) MinimockFinish ¶
func (m *JetIndexAccessorMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*JetIndexAccessorMock) MinimockForDone ¶
func (m *JetIndexAccessorMock) MinimockForDone() bool
MinimockForDone returns true if the count of the For invocations corresponds the number of defined expectations
func (*JetIndexAccessorMock) MinimockForInspect ¶
func (m *JetIndexAccessorMock) MinimockForInspect()
MinimockForInspect logs each unmet expectation
func (*JetIndexAccessorMock) MinimockWait ¶
func (m *JetIndexAccessorMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
type JetIndexAccessorMockForExpectation ¶
type JetIndexAccessorMockForExpectation struct { Counter uint64 // contains filtered or unexported fields }
JetIndexAccessorMockForExpectation specifies expectation struct of the JetIndexAccessor.For
func (*JetIndexAccessorMockForExpectation) Then ¶
func (e *JetIndexAccessorMockForExpectation) Then(m1 map[insolar.ID]struct { }) *JetIndexAccessorMock
Then sets up JetIndexAccessor.For return parameters for the expectation previously defined by the When method
type JetIndexAccessorMockForParams ¶
type JetIndexAccessorMockForParams struct {
// contains filtered or unexported fields
}
JetIndexAccessorMockForParams contains parameters of the JetIndexAccessor.For
type JetIndexAccessorMockForResults ¶
type JetIndexAccessorMockForResults struct {
// contains filtered or unexported fields
}
JetIndexAccessorMockForResults contains results of the JetIndexAccessor.For
type JetIndexModifier ¶
type JetIndexModifier interface { Add(id insolar.ID, jetID insolar.JetID) Delete(id insolar.ID, jetID insolar.JetID) }
JetIndexModifier is an interface for modifying index records.
type JetIndexModifierMock ¶
type JetIndexModifierMock struct { AddMock mJetIndexModifierMockAdd DeleteMock mJetIndexModifierMockDelete // contains filtered or unexported fields }
JetIndexModifierMock implements JetIndexModifier
func NewJetIndexModifierMock ¶
func NewJetIndexModifierMock(t minimock.Tester) *JetIndexModifierMock
NewJetIndexModifierMock returns a mock for JetIndexModifier
func (*JetIndexModifierMock) Add ¶
func (mmAdd *JetIndexModifierMock) Add(id insolar.ID, jetID insolar.JetID)
Add implements JetIndexModifier
func (*JetIndexModifierMock) AddAfterCounter ¶
func (mmAdd *JetIndexModifierMock) AddAfterCounter() uint64
AddAfterCounter returns a count of finished JetIndexModifierMock.Add invocations
func (*JetIndexModifierMock) AddBeforeCounter ¶
func (mmAdd *JetIndexModifierMock) AddBeforeCounter() uint64
AddBeforeCounter returns a count of JetIndexModifierMock.Add invocations
func (*JetIndexModifierMock) Delete ¶
func (mmDelete *JetIndexModifierMock) Delete(id insolar.ID, jetID insolar.JetID)
Delete implements JetIndexModifier
func (*JetIndexModifierMock) DeleteAfterCounter ¶
func (mmDelete *JetIndexModifierMock) DeleteAfterCounter() uint64
DeleteAfterCounter returns a count of finished JetIndexModifierMock.Delete invocations
func (*JetIndexModifierMock) DeleteBeforeCounter ¶
func (mmDelete *JetIndexModifierMock) DeleteBeforeCounter() uint64
DeleteBeforeCounter returns a count of JetIndexModifierMock.Delete invocations
func (*JetIndexModifierMock) MinimockAddDone ¶
func (m *JetIndexModifierMock) MinimockAddDone() bool
MinimockAddDone returns true if the count of the Add invocations corresponds the number of defined expectations
func (*JetIndexModifierMock) MinimockAddInspect ¶
func (m *JetIndexModifierMock) MinimockAddInspect()
MinimockAddInspect logs each unmet expectation
func (*JetIndexModifierMock) MinimockDeleteDone ¶
func (m *JetIndexModifierMock) MinimockDeleteDone() bool
MinimockDeleteDone returns true if the count of the Delete invocations corresponds the number of defined expectations
func (*JetIndexModifierMock) MinimockDeleteInspect ¶
func (m *JetIndexModifierMock) MinimockDeleteInspect()
MinimockDeleteInspect logs each unmet expectation
func (*JetIndexModifierMock) MinimockFinish ¶
func (m *JetIndexModifierMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*JetIndexModifierMock) MinimockWait ¶
func (m *JetIndexModifierMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
type JetIndexModifierMockAddExpectation ¶
type JetIndexModifierMockAddExpectation struct { Counter uint64 // contains filtered or unexported fields }
JetIndexModifierMockAddExpectation specifies expectation struct of the JetIndexModifier.Add
type JetIndexModifierMockAddParams ¶
type JetIndexModifierMockAddParams struct {
// contains filtered or unexported fields
}
JetIndexModifierMockAddParams contains parameters of the JetIndexModifier.Add
type JetIndexModifierMockDeleteExpectation ¶
type JetIndexModifierMockDeleteExpectation struct { Counter uint64 // contains filtered or unexported fields }
JetIndexModifierMockDeleteExpectation specifies expectation struct of the JetIndexModifier.Delete
type JetIndexModifierMockDeleteParams ¶
type JetIndexModifierMockDeleteParams struct {
// contains filtered or unexported fields
}
JetIndexModifierMockDeleteParams contains parameters of the JetIndexModifier.Delete
type Key ¶
type Key interface { // Scope returns a first part for constructing a composite key for storing record in db Scope() Scope // ID returns a second part for constructing a composite key for storing record in db ID() []byte }
Key represents a key for the key-value store. Scope is required to separate different DB clients and should be unique.
type Scope ¶
type Scope byte
Scope separates DB clients.
const ( // ScopePulse is the scope for pulse storage. ScopePulse Scope = 1 // ScopeRecord is the scope for record storage. ScopeRecord Scope = 2 // ScopeJetDrop is the scope for a jet drop storage. ScopeJetDrop Scope = 3 // ScopeIndex is the scope for an index records. ScopeIndex Scope = 4 // ScopeLastKnownIndexPN is the scope for a last known pulse number of the index bucket ScopeLastKnownIndexPN Scope = 5 // ScopeGenesis is the scope for a genesis records. ScopeGenesis Scope = 6 // ScopeJetTree is the scope for a jet tree storage. ScopeJetTree Scope = 7 // ScopeJetKeeper is the scope for a jet id storage. ScopeJetKeeper Scope = 8 // ScopeJetKeeperSyncPulse is the scope for a top sync pulse storage. ScopeJetKeeperSyncPulse Scope = 9 // ScopeRecordPosition is the scope for records' positions. ScopeRecordPosition Scope = 10 // ScopeBackupStart is the scope for backup starts. ScopeBackupStart Scope = 11 // ScopeDBInit is scope for one key which means db is initialized. ScopeDBInit Scope = 12 // ScopeNodeHistory is scope for list of nodes for every pulse ScopeNodeHistory Scope = 13 )