Versions in this module Expand all Collapse all v0 v0.9.0 Sep 26, 2019 Changes in this version + func Wrap(msg interface{}) interface + type Disconnect struct + Error error + Peer discover.NodeID + type Exchange struct + Expects []Expect + Label string + Timeout time.Duration + Triggers []Trigger + type Expect struct + Code uint64 + Msg interface{} + Peer discover.NodeID + Timeout time.Duration + type ProtocolSession struct + IDs []discover.NodeID + Server *p2p.Server + func (s *ProtocolSession) TestDisconnected(disconnects ...*Disconnect) error + func (s *ProtocolSession) TestExchanges(exchanges ...Exchange) error + type ProtocolTester struct + func NewProtocolTester(t *testing.T, id discover.NodeID, n int, ...) *ProtocolTester + func (t *ProtocolTester) Connect(selfID discover.NodeID, peers ...*adapters.NodeConfig) + func (t *ProtocolTester) Stop() error + type TestPeer interface + Drop func(error) + ID func() discover.NodeID + type TestPeerPool struct + func NewTestPeerPool() *TestPeerPool + func (p *TestPeerPool) Add(peer TestPeer) + func (p *TestPeerPool) Get(id discover.NodeID) TestPeer + func (p *TestPeerPool) Has(id discover.NodeID) bool + func (p *TestPeerPool) Remove(peer TestPeer) + type Trigger struct + Code uint64 + Msg interface{} + Peer discover.NodeID + Timeout time.Duration + type WrappedMsg struct + Context []byte + Payload []byte + Size uint32