mock

package
v1.0.100 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 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 epochStart.EpochStartHandler)
	UnregisterHandlerCalled func(handler epochStart.EpochStartHandler)
	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.EpochStartHandler)

RegisterHandler -

func (*EpochStartNotifierStub) UnregisterHandler

func (esnm *EpochStartNotifierStub) UnregisterHandler(handler epochStart.EpochStartHandler)

UnregisterHandler -

type PathManagerStub

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

PathManagerStub -

func (*PathManagerStub) IsInterfaceNil

func (p *PathManagerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*PathManagerStub) PathForEpoch

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

PathForEpoch -

func (*PathManagerStub) PathForStatic

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

PathForStatic -

type PersisterFactoryStub

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

PersisterFactoryStub -

func (*PersisterFactoryStub) Create

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

Create -

func (*PersisterFactoryStub) IsInterfaceNil

func (pfs *PersisterFactoryStub) IsInterfaceNil() bool

IsInterfaceNil -

type ShardCoordinatorMock

type ShardCoordinatorMock struct {
	SelfShardId uint32
	NumShards   uint32
}

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(address state.AddressContainer) 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(firstAddress, secondAddress state.AddressContainer) bool

SameShard -

func (*ShardCoordinatorMock) SelfId

func (scm *ShardCoordinatorMock) SelfId() uint32

SelfId -

func (*ShardCoordinatorMock) SetSelfShardId

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

SetSelfShardId -

Jump to

Keyboard shortcuts

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