Documentation ¶
Index ¶
- type Connection
- func (_m *Connection) Close() error
- func (_m *Connection) Handshake(_a0 context.Context, _a1 types.NodeInfo, _a2 crypto.PrivKey) (types.NodeInfo, crypto.PubKey, error)
- func (_m *Connection) LocalEndpoint() p2p.Endpoint
- func (_m *Connection) ReceiveMessage(_a0 context.Context) (conn.ChannelID, []byte, error)
- func (_m *Connection) RemoteEndpoint() p2p.Endpoint
- func (_m *Connection) SendMessage(_a0 context.Context, _a1 conn.ChannelID, _a2 []byte) error
- func (_m *Connection) String() string
- type Transport
- func (_m *Transport) Accept(_a0 context.Context) (p2p.Connection, error)
- func (_m *Transport) AddChannelDescriptors(_a0 []*conn.ChannelDescriptor)
- func (_m *Transport) Close() error
- func (_m *Transport) Dial(_a0 context.Context, _a1 *p2p.Endpoint) (p2p.Connection, error)
- func (_m *Transport) Endpoint() (*p2p.Endpoint, error)
- func (_m *Transport) Listen(_a0 *p2p.Endpoint) error
- 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 ¶
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) Handshake ¶
func (_m *Connection) Handshake(_a0 context.Context, _a1 types.NodeInfo, _a2 crypto.PrivKey) (types.NodeInfo, crypto.PubKey, error)
Handshake provides a mock function with given fields: _a0, _a1, _a2
func (*Connection) LocalEndpoint ¶
func (_m *Connection) LocalEndpoint() p2p.Endpoint
LocalEndpoint provides a mock function with given fields:
func (*Connection) ReceiveMessage ¶
ReceiveMessage provides a mock function with given fields: _a0
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, _a2
func (*Connection) String ¶
func (_m *Connection) String() string
String provides a mock function with given fields:
type Transport ¶
Transport is an autogenerated mock type for the Transport type
func NewTransport ¶
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) AddChannelDescriptors ¶
func (_m *Transport) AddChannelDescriptors(_a0 []*conn.ChannelDescriptor)
AddChannelDescriptors provides a mock function with given fields: _a0