p2pmocks

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NetworkShardingCollectorStub

type NetworkShardingCollectorStub struct {
	UpdatePeerIDInfoCalled    func(pid core.PeerID, pk []byte, shardID uint32)
	UpdatePeerIdSubTypeCalled func(pid core.PeerID, peerSubType core.P2PPeerSubType)
	GetPeerInfoCalled         func(pid core.PeerID) core.P2PPeerInfo
}

NetworkShardingCollectorStub -

func (*NetworkShardingCollectorStub) GetPeerInfo

func (nscs *NetworkShardingCollectorStub) GetPeerInfo(pid core.PeerID) core.P2PPeerInfo

GetPeerInfo -

func (*NetworkShardingCollectorStub) IsInterfaceNil

func (nscs *NetworkShardingCollectorStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*NetworkShardingCollectorStub) UpdatePeerIDInfo

func (nscs *NetworkShardingCollectorStub) UpdatePeerIDInfo(pid core.PeerID, pk []byte, shardID uint32)

UpdatePeerIDInfo -

func (*NetworkShardingCollectorStub) UpdatePeerIdSubType

func (nscs *NetworkShardingCollectorStub) UpdatePeerIdSubType(pid core.PeerID, peerSubType core.P2PPeerSubType)

UpdatePeerIdSubType

type PeersHolderStub

type PeersHolderStub struct {
	PutCalled      func(publicKey []byte, peerID core.PeerID, shardID uint32)
	GetCalled      func() map[uint32][]core.PeerID
	ContainsCalled func(peerID core.PeerID) bool
	RemoveCalled   func(peerID core.PeerID)
	ClearCalled    func()
}

PeersHolderStub -

func (*PeersHolderStub) Clear

func (p *PeersHolderStub) Clear()

Clear -

func (*PeersHolderStub) Contains

func (p *PeersHolderStub) Contains(peerID core.PeerID) bool

Contains -

func (*PeersHolderStub) Get

func (p *PeersHolderStub) Get() map[uint32][]core.PeerID

Get -

func (*PeersHolderStub) IsInterfaceNil

func (p *PeersHolderStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*PeersHolderStub) Put

func (p *PeersHolderStub) Put(publicKey []byte, peerID core.PeerID, shardID uint32)

Put -

func (*PeersHolderStub) Remove

func (p *PeersHolderStub) Remove(peerID core.PeerID)

Remove -

Jump to

Keyboard shortcuts

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