Documentation ¶
Index ¶
- type Channel
- type Connection
- func (_m *Connection) Close() 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(_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 Channel ¶
Channel is an autogenerated mock type for the Channel type
func NewChannel ¶
NewChannel creates a new instance of Channel. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*Channel) Receive ¶
func (_m *Channel) Receive(_a0 context.Context) *p2p.ChannelIterator
Receive provides a mock function with given fields: _a0
type Connection ¶
Connection is an autogenerated mock type for the Connection type
func NewConnection ¶
func NewConnection(t interface { mock.TestingT Cleanup(func()) }) *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. The first argument is typically a *testing.T value.
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 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 ¶
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 ¶
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. The first argument is typically a *testing.T value.
func (*Transport) AddChannelDescriptors ¶
func (_m *Transport) AddChannelDescriptors(_a0 []*conn.ChannelDescriptor)
AddChannelDescriptors provides a mock function with given fields: _a0