mocks

package
v0.37.0-dev Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	mock.Mock
}

Connection is an autogenerated mock type for the Connection type

func NewConnection added in v0.35.8

func NewConnection(t NewConnectionT) *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

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

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 NewConnectionT

type NewConnectionT interface {
	mock.TestingT
	Cleanup(func())
}

type NewTransportT

type NewTransportT interface {
	mock.TestingT
	Cleanup(func())
}

type Transport

type Transport struct {
	mock.Mock
}

Transport is an autogenerated mock type for the Transport type

func NewTransport added in v0.35.8

func NewTransport(t NewTransportT) *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(_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