Documentation ¶
Index ¶
- type Connection
- func (_m *Connection) Close() error
- func (_m *Connection) FlushClose() error
- func (_m *Connection) Handshake(_a0 context.Context, _a1 time.Duration, _a2 types.NodeInfo, _a3 crypto.PrivKey) (types.NodeInfo, crypto.PubKey, error)
- func (_m *Connection) LocalEndpoint() p2p.Endpoint
- func (_m *Connection) ReceiveMessage() (p2p.ChannelID, []byte, error)
- func (_m *Connection) RemoteEndpoint() p2p.Endpoint
- func (_m *Connection) SendMessage(_a0 p2p.ChannelID, _a1 []byte) (bool, error)
- func (_m *Connection) Status() conn.ConnectionStatus
- func (_m *Connection) String() string
- func (_m *Connection) TrySendMessage(_a0 p2p.ChannelID, _a1 []byte) (bool, error)
- type Peer
- func (_m *Peer) CloseConn() error
- func (_m *Peer) FlushStop()
- func (_m *Peer) Get(_a0 string) interface{}
- func (_m *Peer) ID() types.NodeID
- func (_m *Peer) IsOutbound() bool
- func (_m *Peer) IsPersistent() bool
- func (_m *Peer) IsRunning() bool
- func (_m *Peer) NodeInfo() types.NodeInfo
- func (_m *Peer) OnReset() error
- func (_m *Peer) OnStart() error
- func (_m *Peer) OnStop()
- func (_m *Peer) Quit() <-chan struct{}
- func (_m *Peer) RemoteAddr() net.Addr
- func (_m *Peer) RemoteIP() net.IP
- func (_m *Peer) Reset() error
- func (_m *Peer) Send(_a0 byte, _a1 []byte) bool
- func (_m *Peer) Set(_a0 string, _a1 interface{})
- func (_m *Peer) SetLogger(_a0 log.Logger)
- func (_m *Peer) SocketAddr() *types.NetAddress
- func (_m *Peer) Start() error
- func (_m *Peer) Status() conn.ConnectionStatus
- func (_m *Peer) Stop() error
- func (_m *Peer) String() string
- func (_m *Peer) TrySend(_a0 byte, _a1 []byte) bool
- func (_m *Peer) Wait()
- type Transport
- func (_m *Transport) Accept() (p2p.Connection, error)
- func (_m *Transport) Close() error
- func (_m *Transport) Dial(_a0 context.Context, _a1 p2p.Endpoint) (p2p.Connection, error)
- func (_m *Transport) Endpoints() []p2p.Endpoint
- func (_m *Transport) Protocols() []p2p.Protocol
- func (_m *Transport) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
Connection is an autogenerated mock type for the Connection type
func NewConnection ¶ added in v0.35.8
func NewConnection(t mockConstructorTestingTNewConnection) *Connection
NewConnection creates a new instance of Connection. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Connection) Close ¶
func (_m *Connection) Close() error
Close provides a mock function with given fields:
func (*Connection) FlushClose ¶
func (_m *Connection) FlushClose() error
FlushClose provides a mock function with given fields:
func (*Connection) Handshake ¶
func (_m *Connection) Handshake(_a0 context.Context, _a1 time.Duration, _a2 types.NodeInfo, _a3 crypto.PrivKey) (types.NodeInfo, crypto.PubKey, error)
Handshake provides a mock function with given fields: _a0, _a1, _a2, _a3
func (*Connection) LocalEndpoint ¶
func (_m *Connection) LocalEndpoint() p2p.Endpoint
LocalEndpoint provides a mock function with given fields:
func (*Connection) ReceiveMessage ¶
func (_m *Connection) ReceiveMessage() (p2p.ChannelID, []byte, error)
ReceiveMessage provides a mock function with given fields:
func (*Connection) RemoteEndpoint ¶
func (_m *Connection) RemoteEndpoint() p2p.Endpoint
RemoteEndpoint provides a mock function with given fields:
func (*Connection) SendMessage ¶
SendMessage provides a mock function with given fields: _a0, _a1
func (*Connection) Status ¶
func (_m *Connection) Status() conn.ConnectionStatus
Status provides a mock function with given fields:
func (*Connection) String ¶
func (_m *Connection) String() string
String provides a mock function with given fields:
func (*Connection) TrySendMessage ¶
TrySendMessage provides a mock function with given fields: _a0, _a1
type Peer ¶
Peer is an autogenerated mock type for the Peer type
func NewPeer ¶ added in v0.35.8
func NewPeer(t mockConstructorTestingTNewPeer) *Peer
NewPeer creates a new instance of Peer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Peer) FlushStop ¶
func (_m *Peer) FlushStop()
FlushStop provides a mock function with given fields:
func (*Peer) IsOutbound ¶
IsOutbound provides a mock function with given fields:
func (*Peer) IsPersistent ¶
IsPersistent provides a mock function with given fields:
func (*Peer) Quit ¶
func (_m *Peer) Quit() <-chan struct{}
Quit provides a mock function with given fields:
func (*Peer) RemoteAddr ¶
RemoteAddr provides a mock function with given fields:
func (*Peer) SocketAddr ¶
func (_m *Peer) SocketAddr() *types.NetAddress
SocketAddr provides a mock function with given fields:
func (*Peer) Status ¶
func (_m *Peer) Status() conn.ConnectionStatus
Status provides a mock function with given fields:
type Transport ¶
Transport is an autogenerated mock type for the Transport type
func NewTransport ¶ added in v0.35.8
func NewTransport(t mockConstructorTestingTNewTransport) *Transport
NewTransport creates a new instance of Transport. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Transport) Accept ¶
func (_m *Transport) Accept() (p2p.Connection, error)
Accept provides a mock function with given fields: