Documentation ¶
Index ¶
- type Net
- func (mn *Net) ConnectAllButSelf(h host.Host) error
- func (mn *Net) GenPeerWithMarshalablePrivKey() (host.Host, error)
- func (mn *Net) LinkAllButSelf(h host.Host) error
- func (mn *Net) MustConnect(a, b peer.ID)
- func (mn *Net) MustNewConnectedPeer() host.Host
- func (mn *Net) MustNewLinkedPeer() host.Host
- func (mn *Net) NewConnectedPeer() (host.Host, error)
- func (mn *Net) NewLinkedPeer() (host.Host, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Net ¶
Net creates a mock network for testing.
func (*Net) ConnectAllButSelf ¶
ConnectAllButSelf makes h connects to every node in net
func (*Net) GenPeerWithMarshalablePrivKey ¶
GenPeerWithMarshalablePrivKey is the alternative GenPeer(), to avoid the unmarshal failure when checking the sign
func (*Net) LinkAllButSelf ¶
LinkAllButSelf makes h links to every node in net
func (*Net) MustConnect ¶ added in v0.0.9
MustConnect connects peer.
func (*Net) MustNewConnectedPeer ¶ added in v0.0.9
MustNewConnectedPeer returns a full-mesh-connected host
func (*Net) MustNewLinkedPeer ¶ added in v0.0.9
MustNewLinkedPeer returns a full-mesh-linked host
func (*Net) NewConnectedPeer ¶
NewConnectedPeer returns a full-mesh-connected host
Click to show internal directories.
Click to hide internal directories.