mocks

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	mock.Mock
}

Channel is an autogenerated mock type for the Channel type

func NewChannel

func NewChannel(t interface {
	mock.TestingT
	Cleanup(func())
}) *Channel

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) Err

func (_m *Channel) Err() error

Err provides a mock function with given fields:

func (*Channel) Receive

func (_m *Channel) Receive(_a0 context.Context) p2p.ChannelIterator

Receive provides a mock function with given fields: _a0

func (*Channel) Send

func (_m *Channel) Send(_a0 context.Context, _a1 p2p.Envelope) error

Send provides a mock function with given fields: _a0, _a1

func (*Channel) SendError

func (_m *Channel) SendError(_a0 context.Context, _a1 p2p.PeerError) error

SendError provides a mock function with given fields: _a0, _a1

func (*Channel) String

func (_m *Channel) String() string

String provides a mock function with given fields:

type Connection

type Connection struct {
	mock.Mock
}

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

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(_a0 context.Context) (conn.ChannelID, []byte, error)

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

func (_m *Connection) SendMessage(_a0 context.Context, _a1 conn.ChannelID, _a2 []byte) error

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

type Transport struct {
	mock.Mock
}

Transport is an autogenerated mock type for the Transport type

func NewTransport

func NewTransport(t interface {
	mock.TestingT
	Cleanup(func())
}) *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. The first argument is typically a *testing.T value.

func (*Transport) Accept

func (_m *Transport) Accept(_a0 context.Context) (p2p.Connection, error)

Accept provides a mock function with given fields: _a0

func (*Transport) AddChannelDescriptors

func (_m *Transport) AddChannelDescriptors(_a0 []*conn.ChannelDescriptor)

AddChannelDescriptors provides a mock function with given fields: _a0

func (*Transport) Close

func (_m *Transport) Close() error

Close provides a mock function with given fields:

func (*Transport) Dial

func (_m *Transport) Dial(_a0 context.Context, _a1 *p2p.Endpoint) (p2p.Connection, error)

Dial provides a mock function with given fields: _a0, _a1

func (*Transport) Endpoint

func (_m *Transport) Endpoint() (*p2p.Endpoint, error)

Endpoint provides a mock function with given fields:

func (*Transport) Listen

func (_m *Transport) Listen(_a0 *p2p.Endpoint) error

Listen provides a mock function with given fields: _a0

func (*Transport) Protocols

func (_m *Transport) Protocols() []p2p.Protocol

Protocols provides a mock function with given fields:

func (*Transport) String

func (_m *Transport) String() string

String provides a mock function with given fields:

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL