networkmock

package
v0.15.5 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2021 License: MIT Imports: 12 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) RegisterResolver added in v0.15.5

func (m *MockNetwork) RegisterResolver(resolver network.Resolver)

RegisterResolver mocks base method

func (*MockNetwork) Send

func (m *MockNetwork) Send(ctx context.Context, object *object.Object, publicKey crypto.PublicKey, sendOptions ...network.SendOption) 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) RegisterResolver added in v0.15.5

func (mr *MockNetworkMockRecorder) RegisterResolver(resolver interface{}) *gomock.Call

RegisterResolver indicates an expected call of RegisterResolver

func (*MockNetworkMockRecorder) Send

func (mr *MockNetworkMockRecorder) Send(ctx, object, publicKey interface{}, sendOptions ...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) RegisterResolver added in v0.15.5

func (m *MockNetworkSimple) RegisterResolver(
	resolver network.Resolver,
)

func (*MockNetworkSimple) Send

func (*MockNetworkSimple) SendCalled

func (m *MockNetworkSimple) SendCalled() int

func (*MockNetworkSimple) Subscribe

func (*MockNetworkSimple) SubscribeCalled

func (m *MockNetworkSimple) SubscribeCalled() int

type MockResolver added in v0.15.5

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

MockResolver is a mock of Resolver interface

func NewMockResolver added in v0.15.5

func NewMockResolver(ctrl *gomock.Controller) *MockResolver

NewMockResolver creates a new mock instance

func (*MockResolver) EXPECT added in v0.15.5

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

func (*MockResolver) LookupPeer added in v0.15.5

func (m *MockResolver) LookupPeer(ctx context.Context, publicKey crypto.PublicKey) (*peer.ConnectionInfo, error)

LookupPeer mocks base method

type MockResolverMockRecorder added in v0.15.5

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

MockResolverMockRecorder is the mock recorder for MockResolver

func (*MockResolverMockRecorder) LookupPeer added in v0.15.5

func (mr *MockResolverMockRecorder) LookupPeer(ctx, publicKey interface{}) *gomock.Call

LookupPeer indicates an expected call of LookupPeer

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) Channel added in v0.15.0

func (s *MockSubscriptionSimple) Channel() <-chan *network.Envelope

Next returns the next object

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