Documentation ¶
Index ¶
- type ChainStorerStub
- func (css *ChainStorerStub) AddStorer(key dataRetriever.UnitType, s storage.Storer)
- func (css *ChainStorerStub) CloseAll() error
- func (css *ChainStorerStub) Destroy() error
- func (css *ChainStorerStub) Get(unitType dataRetriever.UnitType, key []byte) ([]byte, error)
- func (css *ChainStorerStub) GetAll(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error)
- func (css *ChainStorerStub) GetAllStorers() map[dataRetriever.UnitType]storage.Storer
- func (css *ChainStorerStub) GetStorer(unitType dataRetriever.UnitType) storage.Storer
- func (css *ChainStorerStub) Has(unitType dataRetriever.UnitType, key []byte) error
- func (css *ChainStorerStub) IsInterfaceNil() bool
- func (css *ChainStorerStub) Put(unitType dataRetriever.UnitType, key []byte, value []byte) error
- func (css *ChainStorerStub) SetEpochForPutOperation(_ uint32)
- type HeadersCacherStub
- func (hcs *HeadersCacherStub) AddHeader(headerHash []byte, header data.HeaderHandler)
- func (hcs *HeadersCacherStub) Clear()
- func (hcs *HeadersCacherStub) GetHeaderByHash(hash []byte) (data.HeaderHandler, error)
- func (hcs *HeadersCacherStub) GetHeadersByNonceAndShardId(hdrNonce uint64, shardId uint32) ([]data.HeaderHandler, [][]byte, error)
- func (hcs *HeadersCacherStub) GetNumHeaders(shardId uint32) int
- func (hcs *HeadersCacherStub) IsInterfaceNil() bool
- func (hcs *HeadersCacherStub) Len() int
- func (hcs *HeadersCacherStub) MaxSize() int
- func (hcs *HeadersCacherStub) Nonces(shardId uint32) []uint64
- func (hcs *HeadersCacherStub) RegisterHandler(handler func(header data.HeaderHandler, shardHeaderHash []byte))
- func (hcs *HeadersCacherStub) RemoveHeaderByHash(headerHash []byte)
- func (hcs *HeadersCacherStub) RemoveHeaderByNonceAndShardId(hdrNonce uint64, shardId uint32)
- type MarshalizerStub
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChainStorerStub ¶
type ChainStorerStub struct { AddStorerCalled func(key dataRetriever.UnitType, s storage.Storer) GetStorerCalled func(unitType dataRetriever.UnitType) storage.Storer 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 (css *ChainStorerStub) AddStorer(key dataRetriever.UnitType, s storage.Storer)
AddStorer -
func (*ChainStorerStub) Get ¶
func (css *ChainStorerStub) Get(unitType dataRetriever.UnitType, key []byte) ([]byte, error)
Get -
func (*ChainStorerStub) GetAll ¶
func (css *ChainStorerStub) GetAll(unitType dataRetriever.UnitType, keys [][]byte) (map[string][]byte, error)
GetAll -
func (*ChainStorerStub) GetAllStorers ¶ added in v1.2.4
func (css *ChainStorerStub) GetAllStorers() map[dataRetriever.UnitType]storage.Storer
GetAllStorers -
func (*ChainStorerStub) GetStorer ¶
func (css *ChainStorerStub) GetStorer(unitType dataRetriever.UnitType) storage.Storer
GetStorer -
func (*ChainStorerStub) Has ¶
func (css *ChainStorerStub) Has(unitType dataRetriever.UnitType, key []byte) error
Has -
func (*ChainStorerStub) IsInterfaceNil ¶
func (css *ChainStorerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*ChainStorerStub) Put ¶
func (css *ChainStorerStub) Put(unitType dataRetriever.UnitType, key []byte, value []byte) error
Put -
func (*ChainStorerStub) SetEpochForPutOperation ¶
func (css *ChainStorerStub) SetEpochForPutOperation(_ uint32)
SetEpochForPutOperation -
type HeadersCacherStub ¶
type HeadersCacherStub struct { AddCalled func(headerHash []byte, header data.HeaderHandler) RemoveHeaderByHashCalled func(headerHash []byte) RemoveHeaderByNonceAndShardIdCalled func(hdrNonce uint64, shardId uint32) GetHeaderByNonceAndShardIdCalled func(hdrNonce uint64, shardId uint32) ([]data.HeaderHandler, [][]byte, error) GetHeaderByHashCalled func(hash []byte) (data.HeaderHandler, error) ClearCalled func() RegisterHandlerCalled func(handler func(header data.HeaderHandler, shardHeaderHash []byte)) NoncesCalled func(shardId uint32) []uint64 LenCalled func() int MaxSizeCalled func() int GetNumHeadersCalled func(shardId uint32) int }
HeadersCacherStub -
func (*HeadersCacherStub) AddHeader ¶
func (hcs *HeadersCacherStub) AddHeader(headerHash []byte, header data.HeaderHandler)
AddHeader -
func (*HeadersCacherStub) GetHeaderByHash ¶
func (hcs *HeadersCacherStub) GetHeaderByHash(hash []byte) (data.HeaderHandler, error)
GetHeaderByHash -
func (*HeadersCacherStub) GetHeadersByNonceAndShardId ¶
func (hcs *HeadersCacherStub) GetHeadersByNonceAndShardId(hdrNonce uint64, shardId uint32) ([]data.HeaderHandler, [][]byte, error)
GetHeadersByNonceAndShardId -
func (*HeadersCacherStub) GetNumHeaders ¶
func (hcs *HeadersCacherStub) GetNumHeaders(shardId uint32) int
GetNumHeaders -
func (*HeadersCacherStub) IsInterfaceNil ¶
func (hcs *HeadersCacherStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*HeadersCacherStub) Nonces ¶
func (hcs *HeadersCacherStub) Nonces(shardId uint32) []uint64
Nonces -
func (*HeadersCacherStub) RegisterHandler ¶
func (hcs *HeadersCacherStub) RegisterHandler(handler func(header data.HeaderHandler, shardHeaderHash []byte))
RegisterHandler -
func (*HeadersCacherStub) RemoveHeaderByHash ¶
func (hcs *HeadersCacherStub) RemoveHeaderByHash(headerHash []byte)
RemoveHeaderByHash -
func (*HeadersCacherStub) RemoveHeaderByNonceAndShardId ¶
func (hcs *HeadersCacherStub) RemoveHeaderByNonceAndShardId(hdrNonce uint64, shardId uint32)
RemoveHeaderByNonceAndShardId -
type MarshalizerStub ¶
type MarshalizerStub struct { MarshalCalled func(obj interface{}) ([]byte, error) UnmarshalCalled func(obj interface{}, buff []byte) error }
MarshalizerStub -
func (*MarshalizerStub) IsInterfaceNil ¶
func (ms *MarshalizerStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*MarshalizerStub) Marshal ¶
func (ms *MarshalizerStub) Marshal(obj interface{}) ([]byte, error)
Marshal -
func (*MarshalizerStub) Unmarshal ¶
func (ms *MarshalizerStub) Unmarshal(obj interface{}, buff []byte) error
Unmarshal -
Click to show internal directories.
Click to hide internal directories.