controller

package
v0.0.0-...-05bc493 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RPCController

type RPCController interface {
	SendBytes(ctx context.Context, nodeID reference.Global, name string, msgBytes []byte) ([]byte, error)
	RemoteProcedureRegister(name string, method RemoteProcedure)
}

func NewRPCController

func NewRPCController(options *network.Options) RPCController

type RPCControllerMock

type RPCControllerMock struct {
	RemoteProcedureRegisterMock mRPCControllerMockRemoteProcedureRegister

	SendBytesMock mRPCControllerMockSendBytes
	// contains filtered or unexported fields
}

RPCControllerMock implements RPCController

func NewRPCControllerMock

func NewRPCControllerMock(t minimock.Tester) *RPCControllerMock

NewRPCControllerMock returns a mock for RPCController

func (*RPCControllerMock) MinimockFinish

func (m *RPCControllerMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*RPCControllerMock) MinimockRemoteProcedureRegisterDone

func (m *RPCControllerMock) MinimockRemoteProcedureRegisterDone() bool

MinimockRemoteProcedureRegisterDone returns true if the count of the RemoteProcedureRegister invocations corresponds the number of defined expectations

func (*RPCControllerMock) MinimockRemoteProcedureRegisterInspect

func (m *RPCControllerMock) MinimockRemoteProcedureRegisterInspect()

MinimockRemoteProcedureRegisterInspect logs each unmet expectation

func (*RPCControllerMock) MinimockSendBytesDone

func (m *RPCControllerMock) MinimockSendBytesDone() bool

MinimockSendBytesDone returns true if the count of the SendBytes invocations corresponds the number of defined expectations

func (*RPCControllerMock) MinimockSendBytesInspect

func (m *RPCControllerMock) MinimockSendBytesInspect()

MinimockSendBytesInspect logs each unmet expectation

func (*RPCControllerMock) MinimockWait

func (m *RPCControllerMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

func (*RPCControllerMock) RemoteProcedureRegister

func (mmRemoteProcedureRegister *RPCControllerMock) RemoteProcedureRegister(name string, method RemoteProcedure)

RemoteProcedureRegister implements RPCController

func (*RPCControllerMock) RemoteProcedureRegisterAfterCounter

func (mmRemoteProcedureRegister *RPCControllerMock) RemoteProcedureRegisterAfterCounter() uint64

RemoteProcedureRegisterAfterCounter returns a count of finished RPCControllerMock.RemoteProcedureRegister invocations

func (*RPCControllerMock) RemoteProcedureRegisterBeforeCounter

func (mmRemoteProcedureRegister *RPCControllerMock) RemoteProcedureRegisterBeforeCounter() uint64

RemoteProcedureRegisterBeforeCounter returns a count of RPCControllerMock.RemoteProcedureRegister invocations

func (*RPCControllerMock) SendBytes

func (mmSendBytes *RPCControllerMock) SendBytes(ctx context.Context, nodeID reference.Global, name string, msgBytes []byte) (ba1 []byte, err error)

SendBytes implements RPCController

func (*RPCControllerMock) SendBytesAfterCounter

func (mmSendBytes *RPCControllerMock) SendBytesAfterCounter() uint64

SendBytesAfterCounter returns a count of finished RPCControllerMock.SendBytes invocations

func (*RPCControllerMock) SendBytesBeforeCounter

func (mmSendBytes *RPCControllerMock) SendBytesBeforeCounter() uint64

SendBytesBeforeCounter returns a count of RPCControllerMock.SendBytes invocations

type RPCControllerMockRemoteProcedureRegisterExpectation

type RPCControllerMockRemoteProcedureRegisterExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

RPCControllerMockRemoteProcedureRegisterExpectation specifies expectation struct of the RPCController.RemoteProcedureRegister

type RPCControllerMockRemoteProcedureRegisterParams

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

RPCControllerMockRemoteProcedureRegisterParams contains parameters of the RPCController.RemoteProcedureRegister

type RPCControllerMockSendBytesExpectation

type RPCControllerMockSendBytesExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

RPCControllerMockSendBytesExpectation specifies expectation struct of the RPCController.SendBytes

func (*RPCControllerMockSendBytesExpectation) Then

Then sets up RPCController.SendBytes return parameters for the expectation previously defined by the When method

type RPCControllerMockSendBytesParams

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

RPCControllerMockSendBytesParams contains parameters of the RPCController.SendBytes

type RPCControllerMockSendBytesResults

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

RPCControllerMockSendBytesResults contains results of the RPCController.SendBytes

type RemoteProcedure

type RemoteProcedure func(ctx context.Context, args []byte) ([]byte, error)

RemoteProcedure is remote procedure call function.

Jump to

Keyboard shortcuts

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