networkmock

package
v0.14.8 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package networkmock is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockNetwork

type MockNetwork struct {
	// contains filtered or unexported fields
}

MockNetwork is a mock of Network interface

func NewMockNetwork

func NewMockNetwork(ctrl *gomock.Controller) *MockNetwork

NewMockNetwork creates a new mock instance

func (*MockNetwork) EXPECT

func (m *MockNetwork) EXPECT() *MockNetworkMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockNetwork) Listen

func (m *MockNetwork) Listen(ctx context.Context, bindAddress string, options ...network.ListenOption) (net.Listener, error)

Listen mocks base method

func (*MockNetwork) LocalPeer

func (m *MockNetwork) LocalPeer() localpeer.LocalPeer

LocalPeer mocks base method

func (*MockNetwork) Send

func (m *MockNetwork) Send(ctx context.Context, object *object.Object, recipient *peer.ConnectionInfo) error

Send mocks base method

func (*MockNetwork) Subscribe

Subscribe mocks base method

type MockNetworkMockRecorder

type MockNetworkMockRecorder struct {
	// contains filtered or unexported fields
}

MockNetworkMockRecorder is the mock recorder for MockNetwork

func (*MockNetworkMockRecorder) Listen

func (mr *MockNetworkMockRecorder) Listen(ctx, bindAddress interface{}, options ...interface{}) *gomock.Call

Listen indicates an expected call of Listen

func (*MockNetworkMockRecorder) LocalPeer

func (mr *MockNetworkMockRecorder) LocalPeer() *gomock.Call

LocalPeer indicates an expected call of LocalPeer

func (*MockNetworkMockRecorder) Send

func (mr *MockNetworkMockRecorder) Send(ctx, object, recipient interface{}) *gomock.Call

Send indicates an expected call of Send

func (*MockNetworkMockRecorder) Subscribe

func (mr *MockNetworkMockRecorder) Subscribe(filters ...interface{}) *gomock.Call

Subscribe indicates an expected call of Subscribe

type MockNetworkSimple

type MockNetworkSimple struct {
	SubscribeCalls []network.EnvelopeSubscription

	SendCalls       []error
	ReturnAddresses []string
	ReturnLocalPeer localpeer.LocalPeer
	// contains filtered or unexported fields
}

func (*MockNetworkSimple) Addresses

func (m *MockNetworkSimple) Addresses() []string

func (*MockNetworkSimple) Listen

func (m *MockNetworkSimple) Listen(
	ctx context.Context,
	bindAddress string,
	options ...network.ListenOption,
) (net.Listener, error)

func (*MockNetworkSimple) LocalPeer

func (m *MockNetworkSimple) LocalPeer() localpeer.LocalPeer

func (*MockNetworkSimple) Send

func (m *MockNetworkSimple) Send(
	ctx context.Context,
	obj *object.Object,
	rec *peer.ConnectionInfo,
) error

func (*MockNetworkSimple) SendCalled

func (m *MockNetworkSimple) SendCalled() int

func (*MockNetworkSimple) Subscribe

func (*MockNetworkSimple) SubscribeCalled

func (m *MockNetworkSimple) SubscribeCalled() int

type MockSubscriptionSimple

type MockSubscriptionSimple struct {
	Objects []*network.Envelope
	// contains filtered or unexported fields
}

func (*MockSubscriptionSimple) Cancel

func (s *MockSubscriptionSimple) Cancel()

Cancel the subscription

func (*MockSubscriptionSimple) Next

Next returns the next object

Jump to

Keyboard shortcuts

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