Documentation
¶
Index ¶
- type AdaptedSizedLruCacheStub
- func (a *AdaptedSizedLruCacheStub) AddSized(key, value interface{}, sizeInBytes int64) bool
- func (a *AdaptedSizedLruCacheStub) AddSizedAndReturnEvicted(key, value interface{}, sizeInBytes int64) map[interface{}]interface{}
- func (a *AdaptedSizedLruCacheStub) AddSizedIfMissing(key, value interface{}, sizeInBytes int64) (ok, evicted bool)
- func (a *AdaptedSizedLruCacheStub) Contains(key interface{}) (ok bool)
- func (a *AdaptedSizedLruCacheStub) Get(key interface{}) (value interface{}, ok bool)
- func (a *AdaptedSizedLruCacheStub) IsInterfaceNil() bool
- func (a *AdaptedSizedLruCacheStub) Keys() []interface{}
- func (a *AdaptedSizedLruCacheStub) Len() int
- func (a *AdaptedSizedLruCacheStub) Peek(key interface{}) (value interface{}, ok bool)
- func (a *AdaptedSizedLruCacheStub) Purge()
- func (a *AdaptedSizedLruCacheStub) Remove(key interface{}) bool
- func (a *AdaptedSizedLruCacheStub) SizeInBytesContained() uint64
- type BootStrapDataProviderStub
- func (b *BootStrapDataProviderStub) GetStorer(storer storage.Storer) (process.BootStorer, error)
- func (b *BootStrapDataProviderStub) IsInterfaceNil() bool
- func (b *BootStrapDataProviderStub) LoadForPath(persisterFactory storage.PersisterFactory, path string) (*bootstrapStorage.BootstrapData, storage.Storer, error)
- type DirectoryReaderStub
- func (d *DirectoryReaderStub) IsInterfaceNil() bool
- func (d *DirectoryReaderStub) ListAllAsString(directoryPath string) ([]string, error)
- func (d *DirectoryReaderStub) ListDirectoriesAsString(directoryPath string) ([]string, error)
- func (d *DirectoryReaderStub) ListFilesAsString(directoryPath string) ([]string, error)
- type EpochStartNotifierStub
- func (esnm *EpochStartNotifierStub) IsInterfaceNil() bool
- func (esnm *EpochStartNotifierStub) NotifyAll(hdr data.HeaderHandler)
- func (esnm *EpochStartNotifierStub) RegisterHandler(handler epochStart.ActionHandler)
- func (esnm *EpochStartNotifierStub) UnregisterHandler(handler epochStart.ActionHandler)
- type LatestStorageDataProviderStub
- func (lsdps *LatestStorageDataProviderStub) Get() (storage.LatestDataFromStorage, error)
- func (lsdps *LatestStorageDataProviderStub) GetParentDirAndLastEpoch() (string, uint32, error)
- func (lsdps *LatestStorageDataProviderStub) GetParentDirectory() string
- func (lsdps *LatestStorageDataProviderStub) GetShardsFromDirectory(path string) ([]string, error)
- func (lsdps *LatestStorageDataProviderStub) IsInterfaceNil() bool
- type MarshalizerMock
- type PersisterFactoryStub
- type PersisterStub
- func (p *PersisterStub) Close() error
- func (p *PersisterStub) Destroy() error
- func (p *PersisterStub) DestroyClosed() error
- func (p *PersisterStub) Get(key []byte) ([]byte, error)
- func (p *PersisterStub) Has(key []byte) error
- func (p *PersisterStub) IsInterfaceNil() bool
- func (p *PersisterStub) Put(key, val []byte) error
- func (p *PersisterStub) RangeKeys(handler func(key []byte, val []byte) bool)
- func (p *PersisterStub) Remove(key []byte) error
- type ShardCoordinatorMock
- func (scm *ShardCoordinatorMock) CommunicationIdentifier(destShardID uint32) string
- func (scm *ShardCoordinatorMock) ComputeId(_ []byte) uint32
- func (scm *ShardCoordinatorMock) IsInterfaceNil() bool
- func (scm *ShardCoordinatorMock) NumberOfShards() uint32
- func (scm *ShardCoordinatorMock) SameShard(_, _ []byte) bool
- func (scm *ShardCoordinatorMock) SelfId() uint32
- func (scm *ShardCoordinatorMock) SetSelfShardId(shardId uint32) error
- type StorageListProviderStub
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdaptedSizedLruCacheStub ¶
type AdaptedSizedLruCacheStub struct {
AddSizedCalled func(key, value interface{}, sizeInBytes int64) bool
GetCalled func(key interface{}) (value interface{}, ok bool)
ContainsCalled func(key interface{}) (ok bool)
AddSizedIfMissingCalled func(key, value interface{}, sizeInBytes int64) (ok, evicted bool)
PeekCalled func(key interface{}) (value interface{}, ok bool)
RemoveCalled func(key interface{}) bool
KeysCalled func() []interface{}
LenCalled func() int
SizeInBytesContainedCalled func() uint64
PurgeCalled func()
AddSizedAndReturnEvictedCalled func(key, value interface{}, sizeInBytes int64) map[interface{}]interface{}
}
AdaptedSizedLruCacheStub --
func (*AdaptedSizedLruCacheStub) AddSized ¶
func (a *AdaptedSizedLruCacheStub) AddSized(key, value interface{}, sizeInBytes int64) bool
AddSized -
func (*AdaptedSizedLruCacheStub) AddSizedAndReturnEvicted ¶
func (a *AdaptedSizedLruCacheStub) AddSizedAndReturnEvicted(key, value interface{}, sizeInBytes int64) map[interface{}]interface{}
AddSizedAndReturnEvicted -
func (*AdaptedSizedLruCacheStub) AddSizedIfMissing ¶
func (a *AdaptedSizedLruCacheStub) AddSizedIfMissing(key, value interface{}, sizeInBytes int64) (ok, evicted bool)
AddSizedIfMissing -
func (*AdaptedSizedLruCacheStub) Contains ¶
func (a *AdaptedSizedLruCacheStub) Contains(key interface{}) (ok bool)
Contains -
func (*AdaptedSizedLruCacheStub) Get ¶
func (a *AdaptedSizedLruCacheStub) Get(key interface{}) (value interface{}, ok bool)
Get -
func (*AdaptedSizedLruCacheStub) IsInterfaceNil ¶
func (a *AdaptedSizedLruCacheStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*AdaptedSizedLruCacheStub) Keys ¶
func (a *AdaptedSizedLruCacheStub) Keys() []interface{}
Keys -
func (*AdaptedSizedLruCacheStub) Peek ¶
func (a *AdaptedSizedLruCacheStub) Peek(key interface{}) (value interface{}, ok bool)
Peek -
func (*AdaptedSizedLruCacheStub) Remove ¶
func (a *AdaptedSizedLruCacheStub) Remove(key interface{}) bool
Remove -
func (*AdaptedSizedLruCacheStub) SizeInBytesContained ¶
func (a *AdaptedSizedLruCacheStub) SizeInBytesContained() uint64
SizeInBytesContained -
type BootStrapDataProviderStub ¶
type BootStrapDataProviderStub struct {
LoadForPathCalled func(persisterFactory storage.PersisterFactory, path string) (*bootstrapStorage.BootstrapData, storage.Storer, error)
GetStorerCalled func(storer storage.Storer) (process.BootStorer, error)
}
BootStrapDataProviderStub -
func (*BootStrapDataProviderStub) GetStorer ¶
func (b *BootStrapDataProviderStub) GetStorer(storer storage.Storer) (process.BootStorer, error)
GetStorer -
func (*BootStrapDataProviderStub) IsInterfaceNil ¶
func (b *BootStrapDataProviderStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*BootStrapDataProviderStub) LoadForPath ¶
func (b *BootStrapDataProviderStub) LoadForPath(persisterFactory storage.PersisterFactory, path string) (*bootstrapStorage.BootstrapData, storage.Storer, error)
LoadForPath -
type DirectoryReaderStub ¶
type DirectoryReaderStub struct {
ListFilesAsStringCalled func(directoryPath string) ([]string, error)
ListDirectoriesAsStringCalled func(directoryPath string) ([]string, error)
ListAllAsStringCalled func(directoryPath string) ([]string, error)
}
DirectoryReaderStub -
func (*DirectoryReaderStub) IsInterfaceNil ¶
func (d *DirectoryReaderStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*DirectoryReaderStub) ListAllAsString ¶
func (d *DirectoryReaderStub) ListAllAsString(directoryPath string) ([]string, error)
ListAllAsString -
func (*DirectoryReaderStub) ListDirectoriesAsString ¶
func (d *DirectoryReaderStub) ListDirectoriesAsString(directoryPath string) ([]string, error)
ListDirectoriesAsString -
func (*DirectoryReaderStub) ListFilesAsString ¶
func (d *DirectoryReaderStub) ListFilesAsString(directoryPath string) ([]string, error)
ListFilesAsString -
type EpochStartNotifierStub ¶
type EpochStartNotifierStub struct {
RegisterHandlerCalled func(handler epochStart.ActionHandler)
UnregisterHandlerCalled func(handler epochStart.ActionHandler)
NotifyAllCalled func(hdr data.HeaderHandler)
}
EpochStartNotifierStub -
func (*EpochStartNotifierStub) IsInterfaceNil ¶
func (esnm *EpochStartNotifierStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*EpochStartNotifierStub) NotifyAll ¶
func (esnm *EpochStartNotifierStub) NotifyAll(hdr data.HeaderHandler)
NotifyAll -
func (*EpochStartNotifierStub) RegisterHandler ¶
func (esnm *EpochStartNotifierStub) RegisterHandler(handler epochStart.ActionHandler)
RegisterHandler -
func (*EpochStartNotifierStub) UnregisterHandler ¶
func (esnm *EpochStartNotifierStub) UnregisterHandler(handler epochStart.ActionHandler)
UnregisterHandler -
type LatestStorageDataProviderStub ¶
type LatestStorageDataProviderStub struct {
GetParentDirAndLastEpochCalled func() (string, uint32, error)
GetCalled func() (storage.LatestDataFromStorage, error)
GetShardsFromDirectoryCalled func(path string) ([]string, error)
GetParentDirectoryCalled func() string
}
LatestStorageDataProviderStub -
func (*LatestStorageDataProviderStub) Get ¶
func (lsdps *LatestStorageDataProviderStub) Get() (storage.LatestDataFromStorage, error)
Get -
func (*LatestStorageDataProviderStub) GetParentDirAndLastEpoch ¶
func (lsdps *LatestStorageDataProviderStub) GetParentDirAndLastEpoch() (string, uint32, error)
GetParentDirAndLastEpoch -
func (*LatestStorageDataProviderStub) GetParentDirectory ¶
func (lsdps *LatestStorageDataProviderStub) GetParentDirectory() string
GetParentDirectory -
func (*LatestStorageDataProviderStub) GetShardsFromDirectory ¶
func (lsdps *LatestStorageDataProviderStub) GetShardsFromDirectory(path string) ([]string, error)
GetShardsFromDirectory -
func (*LatestStorageDataProviderStub) IsInterfaceNil ¶
func (lsdps *LatestStorageDataProviderStub) IsInterfaceNil() bool
IsInterfaceNil -
type MarshalizerMock ¶
type MarshalizerMock struct {
Fail bool
}
MarshalizerMock that will be used for testing
func (*MarshalizerMock) IsInterfaceNil ¶
func (mm *MarshalizerMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MarshalizerMock) Marshal ¶
func (mm *MarshalizerMock) Marshal(obj interface{}) ([]byte, error)
Marshal converts the input object in a slice of bytes
func (*MarshalizerMock) Unmarshal ¶
func (mm *MarshalizerMock) Unmarshal(obj interface{}, buff []byte) error
Unmarshal applies the serialized values over an instantiated object
type PersisterFactoryStub ¶
type PersisterFactoryStub struct {
CreateCalled func(path string) (storage.Persister, error)
CreateDisabledCalled func() storage.Persister
}
PersisterFactoryStub -
func (*PersisterFactoryStub) Create ¶
func (pfs *PersisterFactoryStub) Create(path string) (storage.Persister, error)
Create -
func (*PersisterFactoryStub) CreateDisabled ¶
func (pfs *PersisterFactoryStub) CreateDisabled() storage.Persister
CreateDisabled -
func (*PersisterFactoryStub) IsInterfaceNil ¶
func (pfs *PersisterFactoryStub) IsInterfaceNil() bool
IsInterfaceNil -
type PersisterStub ¶
type PersisterStub struct {
PutCalled func(key, val []byte) error
GetCalled func(key []byte) ([]byte, error)
HasCalled func(key []byte) error
CloseCalled func() error
RemoveCalled func(key []byte) error
DestroyCalled func() error
DestroyClosedCalled func() error
RangeKeysCalled func(handler func(key []byte, val []byte) bool)
}
PersisterStub -
func (*PersisterStub) IsInterfaceNil ¶
func (p *PersisterStub) IsInterfaceNil() bool
IsInterfaceNil -
type ShardCoordinatorMock ¶
ShardCoordinatorMock -
func NewShardCoordinatorMock ¶
func NewShardCoordinatorMock(selfShardID uint32, numShards uint32) *ShardCoordinatorMock
NewShardCoordinatorMock -
func (*ShardCoordinatorMock) CommunicationIdentifier ¶
func (scm *ShardCoordinatorMock) CommunicationIdentifier(destShardID uint32) string
CommunicationIdentifier -
func (*ShardCoordinatorMock) ComputeId ¶
func (scm *ShardCoordinatorMock) ComputeId(_ []byte) uint32
ComputeId -
func (*ShardCoordinatorMock) IsInterfaceNil ¶
func (scm *ShardCoordinatorMock) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*ShardCoordinatorMock) NumberOfShards ¶
func (scm *ShardCoordinatorMock) NumberOfShards() uint32
NumberOfShards -
func (*ShardCoordinatorMock) SameShard ¶
func (scm *ShardCoordinatorMock) SameShard(_, _ []byte) bool
SameShard -
func (*ShardCoordinatorMock) SetSelfShardId ¶
func (scm *ShardCoordinatorMock) SetSelfShardId(shardId uint32) error
SetSelfShardId -
type StorageListProviderStub ¶
type StorageListProviderStub struct {
GetAllStorersCalled func() map[dataRetriever.UnitType]storage.Storer
}
StorageListProviderStub -
func (*StorageListProviderStub) GetAllStorers ¶
func (slps *StorageListProviderStub) GetAllStorers() map[dataRetriever.UnitType]storage.Storer
GetAllStorers -
func (*StorageListProviderStub) IsInterfaceNil ¶
func (slps *StorageListProviderStub) IsInterfaceNil() bool
IsInterfaceNil -