Documentation ¶
Index ¶
- func GetStorageManagerArgs() trie.NewTrieStorageManagerArgs
- func GetStorageManagerOptions() trie.StorageManagerOptions
- type ChainStorerStub
- func (stub *ChainStorerStub) AddStorer(key dataRetriever.UnitType, s storage.Storer)
- func (stub *ChainStorerStub) CloseAll() error
- func (stub *ChainStorerStub) Destroy() error
- func (stub *ChainStorerStub) Get(unitType dataRetriever.UnitType, key []byte) ([]byte, error)
- func (stub *ChainStorerStub) GetAll(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error)
- func (stub *ChainStorerStub) GetAllStorers() map[dataRetriever.UnitType]storage.Storer
- func (stub *ChainStorerStub) GetStorer(unitType dataRetriever.UnitType) (storage.Storer, error)
- func (stub *ChainStorerStub) Has(unitType dataRetriever.UnitType, key []byte) error
- func (stub *ChainStorerStub) IsInterfaceNil() bool
- func (stub *ChainStorerStub) Put(unitType dataRetriever.UnitType, key []byte, value []byte) error
- func (stub *ChainStorerStub) SetEpochForPutOperation(_ uint32)
- type StoredDataFactoryStub
- type StorerStub
- func (ss *StorerStub) ClearCache()
- func (ss *StorerStub) Close() error
- func (ss *StorerStub) DestroyUnit() error
- func (ss *StorerStub) Get(key []byte) ([]byte, error)
- func (ss *StorerStub) GetBulkFromEpoch(keys [][]byte, epoch uint32) ([]data.KeyValuePair, error)
- func (ss *StorerStub) GetFromEpoch(key []byte, epoch uint32) ([]byte, error)
- func (ss *StorerStub) GetIdentifier() string
- func (ss *StorerStub) GetOldestEpoch() (uint32, error)
- func (ss *StorerStub) Has(key []byte) error
- func (ss *StorerStub) IsInterfaceNil() bool
- func (ss *StorerStub) Put(key, data []byte) error
- func (ss *StorerStub) PutInEpoch(key, data []byte, epoch uint32) error
- func (ss *StorerStub) RangeKeys(handler func(key []byte, val []byte) bool)
- func (ss *StorerStub) Remove(key []byte) error
- func (ss *StorerStub) RemoveFromCurrentEpoch(key []byte) error
- func (ss *StorerStub) SearchFirst(key []byte) ([]byte, error)
- type UnitOpenerStub
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetStorageManagerArgs ¶ added in v1.6.0
func GetStorageManagerArgs() trie.NewTrieStorageManagerArgs
GetStorageManagerArgs returns mock args for trie storage manager creation
func GetStorageManagerOptions ¶ added in v1.6.0
func GetStorageManagerOptions() trie.StorageManagerOptions
GetStorageManagerOptions returns default options for trie storage manager creation
Types ¶
type ChainStorerStub ¶
type ChainStorerStub struct { AddStorerCalled func(key dataRetriever.UnitType, s storage.Storer) GetStorerCalled func(unitType dataRetriever.UnitType) (storage.Storer, error) HasCalled func(unitType dataRetriever.UnitType, key []byte) error GetCalled func(unitType dataRetriever.UnitType, key []byte) ([]byte, error) PutCalled func(unitType dataRetriever.UnitType, key []byte, value []byte) error GetAllCalled func(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error) GetAllStorersCalled func() map[dataRetriever.UnitType]storage.Storer DestroyCalled func() error CloseAllCalled func() error }
ChainStorerStub -
func (*ChainStorerStub) AddStorer ¶
func (stub *ChainStorerStub) AddStorer(key dataRetriever.UnitType, s storage.Storer)
AddStorer -
func (*ChainStorerStub) Get ¶
func (stub *ChainStorerStub) Get(unitType dataRetriever.UnitType, key []byte) ([]byte, error)
Get -
func (*ChainStorerStub) GetAll ¶
func (stub *ChainStorerStub) GetAll(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error)
GetAll -
func (*ChainStorerStub) GetAllStorers ¶
func (stub *ChainStorerStub) GetAllStorers() map[dataRetriever.UnitType]storage.Storer
GetAllStorers -
func (*ChainStorerStub) GetStorer ¶
func (stub *ChainStorerStub) GetStorer(unitType dataRetriever.UnitType) (storage.Storer, error)
GetStorer -
func (*ChainStorerStub) Has ¶
func (stub *ChainStorerStub) Has(unitType dataRetriever.UnitType, key []byte) error
Has -
func (*ChainStorerStub) IsInterfaceNil ¶
func (stub *ChainStorerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ChainStorerStub) Put ¶
func (stub *ChainStorerStub) Put(unitType dataRetriever.UnitType, key []byte, value []byte) error
Put -
func (*ChainStorerStub) SetEpochForPutOperation ¶
func (stub *ChainStorerStub) SetEpochForPutOperation(_ uint32)
SetEpochForPutOperation -
type StoredDataFactoryStub ¶ added in v1.5.0
type StoredDataFactoryStub struct {
CreateEmptyCalled func() interface{}
}
StoredDataFactoryStub -
func (*StoredDataFactoryStub) CreateEmpty ¶ added in v1.5.0
func (sdf *StoredDataFactoryStub) CreateEmpty() interface{}
CreateEmpty -
func (*StoredDataFactoryStub) IsInterfaceNil ¶ added in v1.5.0
func (sdf *StoredDataFactoryStub) IsInterfaceNil() bool
IsInterfaceNil -
type StorerStub ¶
type StorerStub struct { PutCalled func(key, data []byte) error PutInEpochCalled func(key, data []byte, epoch uint32) error GetCalled func(key []byte) ([]byte, error) HasCalled func(key []byte) error SearchFirstCalled func(key []byte) ([]byte, error) RemoveFromCurrentEpochCalled func(key []byte) error RemoveCalled func(key []byte) error ClearCacheCalled func() DestroyUnitCalled func() error GetFromEpochCalled func(key []byte, epoch uint32) ([]byte, error) GetBulkFromEpochCalled func(keys [][]byte, epoch uint32) ([]data.KeyValuePair, error) GetOldestEpochCalled func() (uint32, error) RangeKeysCalled func(handler func(key []byte, val []byte) bool) GetIdentifierCalled func() string CloseCalled func() error }
StorerStub -
func (*StorerStub) GetBulkFromEpoch ¶
func (ss *StorerStub) GetBulkFromEpoch(keys [][]byte, epoch uint32) ([]data.KeyValuePair, error)
GetBulkFromEpoch -
func (*StorerStub) GetFromEpoch ¶
func (ss *StorerStub) GetFromEpoch(key []byte, epoch uint32) ([]byte, error)
GetFromEpoch -
func (*StorerStub) GetIdentifier ¶ added in v1.6.0
func (ss *StorerStub) GetIdentifier() string
GetIdentifier -
func (*StorerStub) GetOldestEpoch ¶
func (ss *StorerStub) GetOldestEpoch() (uint32, error)
GetOldestEpoch -
func (*StorerStub) PutInEpoch ¶
func (ss *StorerStub) PutInEpoch(key, data []byte, epoch uint32) error
PutInEpoch -
func (*StorerStub) RangeKeys ¶
func (ss *StorerStub) RangeKeys(handler func(key []byte, val []byte) bool)
RangeKeys -
func (*StorerStub) RemoveFromCurrentEpoch ¶
func (ss *StorerStub) RemoveFromCurrentEpoch(key []byte) error
RemoveFromCurrentEpoch -
func (*StorerStub) SearchFirst ¶
func (ss *StorerStub) SearchFirst(key []byte) ([]byte, error)
SearchFirst -
type UnitOpenerStub ¶
type UnitOpenerStub struct { OpenDBCalled func(dbConfig config.DBConfig, shardID uint32, epoch uint32) (storage.Storer, error) GetMostRecentStorageUnitCalled func(config config.DBConfig) (storage.Storer, error) }
UnitOpenerStub -
func (*UnitOpenerStub) GetMostRecentStorageUnit ¶
func (uohs *UnitOpenerStub) GetMostRecentStorageUnit(config config.DBConfig) (storage.Storer, error)
GetMostRecentStorageUnit -
func (*UnitOpenerStub) IsInterfaceNil ¶
func (uohs *UnitOpenerStub) IsInterfaceNil() bool
IsInterfaceNil -
Click to show internal directories.
Click to hide internal directories.