mock

package
v1.0.84 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EpochStartNotifierStub

type EpochStartNotifierStub struct {
	RegisterHandlerCalled   func(handler notifier.SubscribeFunctionHandler)
	UnregisterHandlerCalled func(handler notifier.SubscribeFunctionHandler)
	NotifyAllCalled         func(hdr data.HeaderHandler)
}

func (*EpochStartNotifierStub) IsInterfaceNil

func (esnm *EpochStartNotifierStub) IsInterfaceNil() bool

func (*EpochStartNotifierStub) NotifyAll

func (esnm *EpochStartNotifierStub) NotifyAll(hdr data.HeaderHandler)

func (*EpochStartNotifierStub) RegisterHandler

func (esnm *EpochStartNotifierStub) RegisterHandler(handler notifier.SubscribeFunctionHandler)

func (*EpochStartNotifierStub) UnregisterHandler

func (esnm *EpochStartNotifierStub) UnregisterHandler(handler notifier.SubscribeFunctionHandler)

type PathManagerStub

type PathManagerStub struct {
	PathForEpochCalled  func(shardId string, epoch uint32, identifier string) string
	PathForStaticCalled func(shardId string, identifier string) string
}

func (*PathManagerStub) IsInterfaceNil

func (p *PathManagerStub) IsInterfaceNil() bool

func (*PathManagerStub) PathForEpoch

func (p *PathManagerStub) PathForEpoch(shardId string, epoch uint32, identifier string) string

func (*PathManagerStub) PathForStatic

func (p *PathManagerStub) PathForStatic(shardId string, identifier string) string

type PersisterFactoryStub

type PersisterFactoryStub struct {
	CreateCalled func(path string) (storage.Persister, error)
}

func (*PersisterFactoryStub) Create

func (pfs *PersisterFactoryStub) Create(path string) (storage.Persister, error)

func (*PersisterFactoryStub) IsInterfaceNil

func (pfs *PersisterFactoryStub) IsInterfaceNil() bool

type ShardCoordinatorMock

type ShardCoordinatorMock struct {
	SelfShardId uint32
	NumShards   uint32
}

func NewShardCoordinatorMock

func NewShardCoordinatorMock(selfShardID uint32, numShards uint32) *ShardCoordinatorMock

func (*ShardCoordinatorMock) CommunicationIdentifier

func (scm *ShardCoordinatorMock) CommunicationIdentifier(destShardID uint32) string

func (*ShardCoordinatorMock) ComputeId

func (scm *ShardCoordinatorMock) ComputeId(address state.AddressContainer) uint32

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

func (*ShardCoordinatorMock) SameShard

func (scm *ShardCoordinatorMock) SameShard(firstAddress, secondAddress state.AddressContainer) bool

func (*ShardCoordinatorMock) SelfId

func (scm *ShardCoordinatorMock) SelfId() uint32

func (*ShardCoordinatorMock) SetSelfShardId

func (scm *ShardCoordinatorMock) SetSelfShardId(shardId uint32) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL