mock_network

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package mock_network 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) CountConnectedValidators

func (m *MockNetwork) CountConnectedValidators() uint64

CountConnectedValidators mocks base method.

func (*MockNetwork) CreatePipe

func (m *MockNetwork) CreatePipe(ctx context.Context, pipeID string) (network.Pipe, error)

CreatePipe mocks base method.

func (*MockNetwork) EXPECT

func (m *MockNetwork) EXPECT() *MockNetworkMockRecorder

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

func (*MockNetwork) PeerID

func (m *MockNetwork) PeerID() string

PeerID mocks base method.

func (*MockNetwork) RegisterMsgHandler

func (m *MockNetwork) RegisterMsgHandler(messageType pb.Message_Type, handler func(network.Stream, *pb.Message)) error

RegisterMsgHandler mocks base method.

func (*MockNetwork) RegisterMultiMsgHandler

func (m *MockNetwork) RegisterMultiMsgHandler(messageTypes []pb.Message_Type, handler func(network.Stream, *pb.Message)) error

RegisterMultiMsgHandler mocks base method.

func (*MockNetwork) Send

func (m *MockNetwork) Send(arg0 string, arg1 *pb.Message) (*pb.Message, error)

Send mocks base method.

func (*MockNetwork) SendWithStream

func (m *MockNetwork) SendWithStream(arg0 network.Stream, arg1 *pb.Message) error

SendWithStream mocks base method.

func (*MockNetwork) Start

func (m *MockNetwork) Start() error

Start mocks base method.

func (*MockNetwork) Stop

func (m *MockNetwork) Stop() error

Stop mocks base method.

type MockNetworkMockRecorder

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

MockNetworkMockRecorder is the mock recorder for MockNetwork.

func (*MockNetworkMockRecorder) CountConnectedValidators

func (mr *MockNetworkMockRecorder) CountConnectedValidators() *NetworkCountConnectedValidatorsCall

CountConnectedValidators indicates an expected call of CountConnectedValidators.

func (*MockNetworkMockRecorder) CreatePipe

func (mr *MockNetworkMockRecorder) CreatePipe(ctx, pipeID any) *NetworkCreatePipeCall

CreatePipe indicates an expected call of CreatePipe.

func (*MockNetworkMockRecorder) PeerID

PeerID indicates an expected call of PeerID.

func (*MockNetworkMockRecorder) RegisterMsgHandler

func (mr *MockNetworkMockRecorder) RegisterMsgHandler(messageType, handler any) *NetworkRegisterMsgHandlerCall

RegisterMsgHandler indicates an expected call of RegisterMsgHandler.

func (*MockNetworkMockRecorder) RegisterMultiMsgHandler

func (mr *MockNetworkMockRecorder) RegisterMultiMsgHandler(messageTypes, handler any) *NetworkRegisterMultiMsgHandlerCall

RegisterMultiMsgHandler indicates an expected call of RegisterMultiMsgHandler.

func (*MockNetworkMockRecorder) Send

func (mr *MockNetworkMockRecorder) Send(arg0, arg1 any) *NetworkSendCall

Send indicates an expected call of Send.

func (*MockNetworkMockRecorder) SendWithStream

func (mr *MockNetworkMockRecorder) SendWithStream(arg0, arg1 any) *NetworkSendWithStreamCall

SendWithStream indicates an expected call of SendWithStream.

func (*MockNetworkMockRecorder) Start

Start indicates an expected call of Start.

func (*MockNetworkMockRecorder) Stop

Stop indicates an expected call of Stop.

type MockPipe

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

MockPipe is a mock of Pipe interface.

func NewMockPipe

func NewMockPipe(ctrl *gomock.Controller) *MockPipe

NewMockPipe creates a new mock instance.

func (*MockPipe) Broadcast

func (m *MockPipe) Broadcast(ctx context.Context, targets []string, data []byte) error

Broadcast mocks base method.

func (*MockPipe) EXPECT

func (m *MockPipe) EXPECT() *MockPipeMockRecorder

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

func (*MockPipe) Receive

func (m *MockPipe) Receive(ctx context.Context) *network.PipeMsg

Receive mocks base method.

func (*MockPipe) Send

func (m *MockPipe) Send(ctx context.Context, to string, data []byte) error

Send mocks base method.

func (*MockPipe) String

func (m *MockPipe) String() string

String mocks base method.

type MockPipeMockRecorder

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

MockPipeMockRecorder is the mock recorder for MockPipe.

func (*MockPipeMockRecorder) Broadcast

func (mr *MockPipeMockRecorder) Broadcast(ctx, targets, data any) *PipeBroadcastCall

Broadcast indicates an expected call of Broadcast.

func (*MockPipeMockRecorder) Receive

func (mr *MockPipeMockRecorder) Receive(ctx any) *PipeReceiveCall

Receive indicates an expected call of Receive.

func (*MockPipeMockRecorder) Send

func (mr *MockPipeMockRecorder) Send(ctx, to, data any) *PipeSendCall

Send indicates an expected call of Send.

func (*MockPipeMockRecorder) String

func (mr *MockPipeMockRecorder) String() *PipeStringCall

String indicates an expected call of String.

type NetworkCountConnectedValidatorsCall

type NetworkCountConnectedValidatorsCall struct {
	*gomock.Call
}

NetworkCountConnectedValidatorsCall wrap *gomock.Call

func (*NetworkCountConnectedValidatorsCall) Do

Do rewrite *gomock.Call.Do

func (*NetworkCountConnectedValidatorsCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*NetworkCountConnectedValidatorsCall) Return

Return rewrite *gomock.Call.Return

type NetworkCreatePipeCall

type NetworkCreatePipeCall struct {
	*gomock.Call
}

NetworkCreatePipeCall wrap *gomock.Call

func (*NetworkCreatePipeCall) Do

Do rewrite *gomock.Call.Do

func (*NetworkCreatePipeCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*NetworkCreatePipeCall) Return

Return rewrite *gomock.Call.Return

type NetworkPeerIDCall

type NetworkPeerIDCall struct {
	*gomock.Call
}

NetworkPeerIDCall wrap *gomock.Call

func (*NetworkPeerIDCall) Do

func (c *NetworkPeerIDCall) Do(f func() string) *NetworkPeerIDCall

Do rewrite *gomock.Call.Do

func (*NetworkPeerIDCall) DoAndReturn

func (c *NetworkPeerIDCall) DoAndReturn(f func() string) *NetworkPeerIDCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*NetworkPeerIDCall) Return

func (c *NetworkPeerIDCall) Return(arg0 string) *NetworkPeerIDCall

Return rewrite *gomock.Call.Return

type NetworkRegisterMsgHandlerCall

type NetworkRegisterMsgHandlerCall struct {
	*gomock.Call
}

NetworkRegisterMsgHandlerCall wrap *gomock.Call

func (*NetworkRegisterMsgHandlerCall) Do

Do rewrite *gomock.Call.Do

func (*NetworkRegisterMsgHandlerCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*NetworkRegisterMsgHandlerCall) Return

Return rewrite *gomock.Call.Return

type NetworkRegisterMultiMsgHandlerCall

type NetworkRegisterMultiMsgHandlerCall struct {
	*gomock.Call
}

NetworkRegisterMultiMsgHandlerCall wrap *gomock.Call

func (*NetworkRegisterMultiMsgHandlerCall) Do

Do rewrite *gomock.Call.Do

func (*NetworkRegisterMultiMsgHandlerCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*NetworkRegisterMultiMsgHandlerCall) Return

Return rewrite *gomock.Call.Return

type NetworkSendCall

type NetworkSendCall struct {
	*gomock.Call
}

NetworkSendCall wrap *gomock.Call

func (*NetworkSendCall) Do

Do rewrite *gomock.Call.Do

func (*NetworkSendCall) DoAndReturn

func (c *NetworkSendCall) DoAndReturn(f func(string, *pb.Message) (*pb.Message, error)) *NetworkSendCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*NetworkSendCall) Return

func (c *NetworkSendCall) Return(arg0 *pb.Message, arg1 error) *NetworkSendCall

Return rewrite *gomock.Call.Return

type NetworkSendWithStreamCall

type NetworkSendWithStreamCall struct {
	*gomock.Call
}

NetworkSendWithStreamCall wrap *gomock.Call

func (*NetworkSendWithStreamCall) Do

Do rewrite *gomock.Call.Do

func (*NetworkSendWithStreamCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*NetworkSendWithStreamCall) Return

Return rewrite *gomock.Call.Return

type NetworkStartCall

type NetworkStartCall struct {
	*gomock.Call
}

NetworkStartCall wrap *gomock.Call

func (*NetworkStartCall) Do

func (c *NetworkStartCall) Do(f func() error) *NetworkStartCall

Do rewrite *gomock.Call.Do

func (*NetworkStartCall) DoAndReturn

func (c *NetworkStartCall) DoAndReturn(f func() error) *NetworkStartCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*NetworkStartCall) Return

func (c *NetworkStartCall) Return(arg0 error) *NetworkStartCall

Return rewrite *gomock.Call.Return

type NetworkStopCall

type NetworkStopCall struct {
	*gomock.Call
}

NetworkStopCall wrap *gomock.Call

func (*NetworkStopCall) Do

func (c *NetworkStopCall) Do(f func() error) *NetworkStopCall

Do rewrite *gomock.Call.Do

func (*NetworkStopCall) DoAndReturn

func (c *NetworkStopCall) DoAndReturn(f func() error) *NetworkStopCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*NetworkStopCall) Return

func (c *NetworkStopCall) Return(arg0 error) *NetworkStopCall

Return rewrite *gomock.Call.Return

type PipeBroadcastCall

type PipeBroadcastCall struct {
	*gomock.Call
}

PipeBroadcastCall wrap *gomock.Call

func (*PipeBroadcastCall) Do

Do rewrite *gomock.Call.Do

func (*PipeBroadcastCall) DoAndReturn

func (c *PipeBroadcastCall) DoAndReturn(f func(context.Context, []string, []byte) error) *PipeBroadcastCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*PipeBroadcastCall) Return

func (c *PipeBroadcastCall) Return(arg0 error) *PipeBroadcastCall

Return rewrite *gomock.Call.Return

type PipeReceiveCall

type PipeReceiveCall struct {
	*gomock.Call
}

PipeReceiveCall wrap *gomock.Call

func (*PipeReceiveCall) Do

Do rewrite *gomock.Call.Do

func (*PipeReceiveCall) DoAndReturn

func (c *PipeReceiveCall) DoAndReturn(f func(context.Context) *network.PipeMsg) *PipeReceiveCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*PipeReceiveCall) Return

func (c *PipeReceiveCall) Return(arg0 *network.PipeMsg) *PipeReceiveCall

Return rewrite *gomock.Call.Return

type PipeSendCall

type PipeSendCall struct {
	*gomock.Call
}

PipeSendCall wrap *gomock.Call

func (*PipeSendCall) Do

Do rewrite *gomock.Call.Do

func (*PipeSendCall) DoAndReturn

func (c *PipeSendCall) DoAndReturn(f func(context.Context, string, []byte) error) *PipeSendCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*PipeSendCall) Return

func (c *PipeSendCall) Return(arg0 error) *PipeSendCall

Return rewrite *gomock.Call.Return

type PipeStringCall

type PipeStringCall struct {
	*gomock.Call
}

PipeStringCall wrap *gomock.Call

func (*PipeStringCall) Do

func (c *PipeStringCall) Do(f func() string) *PipeStringCall

Do rewrite *gomock.Call.Do

func (*PipeStringCall) DoAndReturn

func (c *PipeStringCall) DoAndReturn(f func() string) *PipeStringCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*PipeStringCall) Return

func (c *PipeStringCall) Return(arg0 string) *PipeStringCall

Return rewrite *gomock.Call.Return

Jump to

Keyboard shortcuts

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