consensus

package
v0.0.0-...-834e164 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package consensus is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
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 Command

type Command interface {
	ToString() string
	ParseFrom(string) error
}

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.

func (*MockCommand) ToString

func (m *MockCommand) ToString() string

ToString 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

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.

type StateMachine

type StateMachine interface {
	ApplyLog(pLog Command) error
}

Jump to

Keyboard shortcuts

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