Documentation ¶
Overview ¶
Package mock_network is a generated GoMock package.
Index ¶
- type MockNetwork
- func (m *MockNetwork) CountConnectedValidators() uint64
- func (m *MockNetwork) CreatePipe(ctx context.Context, pipeID string) (network.Pipe, error)
- func (m *MockNetwork) EXPECT() *MockNetworkMockRecorder
- func (m *MockNetwork) PeerID() string
- func (m *MockNetwork) RegisterMsgHandler(messageType pb.Message_Type, handler func(network.Stream, *pb.Message)) error
- func (m *MockNetwork) RegisterMultiMsgHandler(messageTypes []pb.Message_Type, handler func(network.Stream, *pb.Message)) error
- func (m *MockNetwork) Send(arg0 string, arg1 *pb.Message) (*pb.Message, error)
- func (m *MockNetwork) SendWithStream(arg0 network.Stream, arg1 *pb.Message) error
- func (m *MockNetwork) Start() error
- func (m *MockNetwork) Stop() error
- type MockNetworkMockRecorder
- func (mr *MockNetworkMockRecorder) CountConnectedValidators() *NetworkCountConnectedValidatorsCall
- func (mr *MockNetworkMockRecorder) CreatePipe(ctx, pipeID any) *NetworkCreatePipeCall
- func (mr *MockNetworkMockRecorder) PeerID() *NetworkPeerIDCall
- func (mr *MockNetworkMockRecorder) RegisterMsgHandler(messageType, handler any) *NetworkRegisterMsgHandlerCall
- func (mr *MockNetworkMockRecorder) RegisterMultiMsgHandler(messageTypes, handler any) *NetworkRegisterMultiMsgHandlerCall
- func (mr *MockNetworkMockRecorder) Send(arg0, arg1 any) *NetworkSendCall
- func (mr *MockNetworkMockRecorder) SendWithStream(arg0, arg1 any) *NetworkSendWithStreamCall
- func (mr *MockNetworkMockRecorder) Start() *NetworkStartCall
- func (mr *MockNetworkMockRecorder) Stop() *NetworkStopCall
- type MockPipe
- func (m *MockPipe) Broadcast(ctx context.Context, targets []string, data []byte) error
- func (m *MockPipe) EXPECT() *MockPipeMockRecorder
- func (m *MockPipe) Receive(ctx context.Context) *network.PipeMsg
- func (m *MockPipe) Send(ctx context.Context, to string, data []byte) error
- func (m *MockPipe) String() string
- type MockPipeMockRecorder
- type NetworkCountConnectedValidatorsCall
- func (c *NetworkCountConnectedValidatorsCall) Do(f func() uint64) *NetworkCountConnectedValidatorsCall
- func (c *NetworkCountConnectedValidatorsCall) DoAndReturn(f func() uint64) *NetworkCountConnectedValidatorsCall
- func (c *NetworkCountConnectedValidatorsCall) Return(arg0 uint64) *NetworkCountConnectedValidatorsCall
- type NetworkCreatePipeCall
- func (c *NetworkCreatePipeCall) Do(f func(context.Context, string) (network.Pipe, error)) *NetworkCreatePipeCall
- func (c *NetworkCreatePipeCall) DoAndReturn(f func(context.Context, string) (network.Pipe, error)) *NetworkCreatePipeCall
- func (c *NetworkCreatePipeCall) Return(arg0 network.Pipe, arg1 error) *NetworkCreatePipeCall
- type NetworkPeerIDCall
- type NetworkRegisterMsgHandlerCall
- func (c *NetworkRegisterMsgHandlerCall) Do(f func(pb.Message_Type, func(network.Stream, *pb.Message)) error) *NetworkRegisterMsgHandlerCall
- func (c *NetworkRegisterMsgHandlerCall) DoAndReturn(f func(pb.Message_Type, func(network.Stream, *pb.Message)) error) *NetworkRegisterMsgHandlerCall
- func (c *NetworkRegisterMsgHandlerCall) Return(arg0 error) *NetworkRegisterMsgHandlerCall
- type NetworkRegisterMultiMsgHandlerCall
- func (c *NetworkRegisterMultiMsgHandlerCall) Do(f func([]pb.Message_Type, func(network.Stream, *pb.Message)) error) *NetworkRegisterMultiMsgHandlerCall
- func (c *NetworkRegisterMultiMsgHandlerCall) DoAndReturn(f func([]pb.Message_Type, func(network.Stream, *pb.Message)) error) *NetworkRegisterMultiMsgHandlerCall
- func (c *NetworkRegisterMultiMsgHandlerCall) Return(arg0 error) *NetworkRegisterMultiMsgHandlerCall
- type NetworkSendCall
- type NetworkSendWithStreamCall
- func (c *NetworkSendWithStreamCall) Do(f func(network.Stream, *pb.Message) error) *NetworkSendWithStreamCall
- func (c *NetworkSendWithStreamCall) DoAndReturn(f func(network.Stream, *pb.Message) error) *NetworkSendWithStreamCall
- func (c *NetworkSendWithStreamCall) Return(arg0 error) *NetworkSendWithStreamCall
- type NetworkStartCall
- type NetworkStopCall
- type PipeBroadcastCall
- type PipeReceiveCall
- type PipeSendCall
- type PipeStringCall
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 ¶
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) 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) SendWithStream ¶
SendWithStream 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 ¶
func (mr *MockNetworkMockRecorder) PeerID() *NetworkPeerIDCall
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 ¶
func (mr *MockNetworkMockRecorder) Start() *NetworkStartCall
Start indicates an expected call of Start.
func (*MockNetworkMockRecorder) Stop ¶
func (mr *MockNetworkMockRecorder) Stop() *NetworkStopCall
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) EXPECT ¶
func (m *MockPipe) EXPECT() *MockPipeMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
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 ¶
NetworkCountConnectedValidatorsCall wrap *gomock.Call
func (*NetworkCountConnectedValidatorsCall) Do ¶
func (c *NetworkCountConnectedValidatorsCall) Do(f func() uint64) *NetworkCountConnectedValidatorsCall
Do rewrite *gomock.Call.Do
func (*NetworkCountConnectedValidatorsCall) DoAndReturn ¶
func (c *NetworkCountConnectedValidatorsCall) DoAndReturn(f func() uint64) *NetworkCountConnectedValidatorsCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*NetworkCountConnectedValidatorsCall) Return ¶
func (c *NetworkCountConnectedValidatorsCall) Return(arg0 uint64) *NetworkCountConnectedValidatorsCall
Return rewrite *gomock.Call.Return
type NetworkCreatePipeCall ¶
NetworkCreatePipeCall wrap *gomock.Call
func (*NetworkCreatePipeCall) Do ¶
func (c *NetworkCreatePipeCall) Do(f func(context.Context, string) (network.Pipe, error)) *NetworkCreatePipeCall
Do rewrite *gomock.Call.Do
func (*NetworkCreatePipeCall) DoAndReturn ¶
func (c *NetworkCreatePipeCall) DoAndReturn(f func(context.Context, string) (network.Pipe, error)) *NetworkCreatePipeCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*NetworkCreatePipeCall) Return ¶
func (c *NetworkCreatePipeCall) Return(arg0 network.Pipe, arg1 error) *NetworkCreatePipeCall
Return rewrite *gomock.Call.Return
type NetworkPeerIDCall ¶
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 ¶
NetworkRegisterMsgHandlerCall wrap *gomock.Call
func (*NetworkRegisterMsgHandlerCall) Do ¶
func (c *NetworkRegisterMsgHandlerCall) Do(f func(pb.Message_Type, func(network.Stream, *pb.Message)) error) *NetworkRegisterMsgHandlerCall
Do rewrite *gomock.Call.Do
func (*NetworkRegisterMsgHandlerCall) DoAndReturn ¶
func (c *NetworkRegisterMsgHandlerCall) DoAndReturn(f func(pb.Message_Type, func(network.Stream, *pb.Message)) error) *NetworkRegisterMsgHandlerCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*NetworkRegisterMsgHandlerCall) Return ¶
func (c *NetworkRegisterMsgHandlerCall) Return(arg0 error) *NetworkRegisterMsgHandlerCall
Return rewrite *gomock.Call.Return
type NetworkRegisterMultiMsgHandlerCall ¶
NetworkRegisterMultiMsgHandlerCall wrap *gomock.Call
func (*NetworkRegisterMultiMsgHandlerCall) Do ¶
func (c *NetworkRegisterMultiMsgHandlerCall) Do(f func([]pb.Message_Type, func(network.Stream, *pb.Message)) error) *NetworkRegisterMultiMsgHandlerCall
Do rewrite *gomock.Call.Do
func (*NetworkRegisterMultiMsgHandlerCall) DoAndReturn ¶
func (c *NetworkRegisterMultiMsgHandlerCall) DoAndReturn(f func([]pb.Message_Type, func(network.Stream, *pb.Message)) error) *NetworkRegisterMultiMsgHandlerCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*NetworkRegisterMultiMsgHandlerCall) Return ¶
func (c *NetworkRegisterMultiMsgHandlerCall) Return(arg0 error) *NetworkRegisterMultiMsgHandlerCall
Return rewrite *gomock.Call.Return
type NetworkSendCall ¶
NetworkSendCall wrap *gomock.Call
func (*NetworkSendCall) Do ¶
func (c *NetworkSendCall) Do(f func(string, *pb.Message) (*pb.Message, error)) *NetworkSendCall
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 ¶
NetworkSendWithStreamCall wrap *gomock.Call
func (*NetworkSendWithStreamCall) Do ¶
func (c *NetworkSendWithStreamCall) Do(f func(network.Stream, *pb.Message) error) *NetworkSendWithStreamCall
Do rewrite *gomock.Call.Do
func (*NetworkSendWithStreamCall) DoAndReturn ¶
func (c *NetworkSendWithStreamCall) DoAndReturn(f func(network.Stream, *pb.Message) error) *NetworkSendWithStreamCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*NetworkSendWithStreamCall) Return ¶
func (c *NetworkSendWithStreamCall) Return(arg0 error) *NetworkSendWithStreamCall
Return rewrite *gomock.Call.Return
type NetworkStartCall ¶
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 ¶
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 ¶
PipeBroadcastCall wrap *gomock.Call
func (*PipeBroadcastCall) Do ¶
func (c *PipeBroadcastCall) Do(f func(context.Context, []string, []byte) error) *PipeBroadcastCall
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 ¶
PipeReceiveCall wrap *gomock.Call
func (*PipeReceiveCall) Do ¶
func (c *PipeReceiveCall) Do(f func(context.Context) *network.PipeMsg) *PipeReceiveCall
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 ¶
PipeSendCall wrap *gomock.Call
func (*PipeSendCall) Do ¶
func (c *PipeSendCall) Do(f func(context.Context, string, []byte) error) *PipeSendCall
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 ¶
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