Documentation ¶
Overview ¶
Package consensus is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( EIndexLessThanMin = errors.New("raftLog: Index Less than minimum") EIndexEqualMin = errors.New("raftLog: Index equal to minimum") EIndexGreaterThanMax = errors.New("raftLog: Index greater than maximum") EPrevIndexAndPrevTermNotMatch = errors.New("raftLog: Previous index and previous term not match") ETimeOut = errors.New("Time Out") EThereIsNewLeader = errors.New("There is a new master node") ESpaceNotEnough = errors.New("There is not enough space") EParamError = errors.New("Param Error") )
Functions ¶
This section is empty.
Types ¶
type MockCommand ¶
type MockCommand struct {
// contains filtered or unexported fields
}
MockCommand is a mock of Command interface.
func NewMockCommand ¶
func NewMockCommand(ctrl *gomock.Controller) *MockCommand
NewMockCommand creates a new mock instance.
func (*MockCommand) EXPECT ¶
func (m *MockCommand) EXPECT() *MockCommandMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockCommand) ParseFrom ¶
func (m *MockCommand) ParseFrom(arg0 string) error
ParseFrom mocks base method.
type MockCommandMockRecorder ¶
type MockCommandMockRecorder struct {
// contains filtered or unexported fields
}
MockCommandMockRecorder is the mock recorder for MockCommand.
func (*MockCommandMockRecorder) ParseFrom ¶
func (mr *MockCommandMockRecorder) ParseFrom(arg0 interface{}) *gomock.Call
ParseFrom indicates an expected call of ParseFrom.
func (*MockCommandMockRecorder) ToString ¶
func (mr *MockCommandMockRecorder) ToString() *gomock.Call
ToString indicates an expected call of ToString.
type MockStateMachine ¶
type MockStateMachine struct {
// contains filtered or unexported fields
}
MockStateMachine is a mock of StateMachine interface.
func NewMockStateMachine ¶
func NewMockStateMachine(ctrl *gomock.Controller) *MockStateMachine
NewMockStateMachine creates a new mock instance.
func (*MockStateMachine) ApplyLog ¶
func (m *MockStateMachine) ApplyLog(pLog Command) error
ApplyLog mocks base method.
func (*MockStateMachine) EXPECT ¶
func (m *MockStateMachine) EXPECT() *MockStateMachineMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockStateMachineMockRecorder ¶
type MockStateMachineMockRecorder struct {
// contains filtered or unexported fields
}
MockStateMachineMockRecorder is the mock recorder for MockStateMachine.
func (*MockStateMachineMockRecorder) ApplyLog ¶
func (mr *MockStateMachineMockRecorder) ApplyLog(pLog interface{}) *gomock.Call
ApplyLog indicates an expected call of ApplyLog.