Documentation ¶
Overview ¶
Package mocktransport is a generated GoMock package.
Index ¶
- func NewInMemTransport(addr raft.ServerAddress) (raft.ServerAddress, transport.Transport)
- type MockTransport
- func (m *MockTransport) AppendEntries(id raft.ServerID, target raft.ServerAddress, args *raft.AppendEntriesRequest, ...) error
- func (m *MockTransport) AppendEntriesPipeline(id raft.ServerID, target raft.ServerAddress) (raft.AppendPipeline, error)
- func (m *MockTransport) Consumer() <-chan raft.RPC
- func (m *MockTransport) DecodePeer(arg0 []byte) raft.ServerAddress
- func (m *MockTransport) EXPECT() *MockTransportMockRecorder
- func (m *MockTransport) EncodePeer(id raft.ServerID, addr raft.ServerAddress) []byte
- func (m *MockTransport) InstallSnapshot(id raft.ServerID, target raft.ServerAddress, args *raft.InstallSnapshotRequest, ...) error
- func (m *MockTransport) LocalAddr() raft.ServerAddress
- func (m *MockTransport) RequestVote(id raft.ServerID, target raft.ServerAddress, args *raft.RequestVoteRequest, ...) error
- func (m *MockTransport) SetHeartbeatHandler(cb func(raft.RPC))
- func (m *MockTransport) TimeoutNow(id raft.ServerID, target raft.ServerAddress, args *raft.TimeoutNowRequest, ...) error
- type MockTransportMockRecorder
- func (mr *MockTransportMockRecorder) AppendEntries(id, target, args, resp interface{}) *gomock.Call
- func (mr *MockTransportMockRecorder) AppendEntriesPipeline(id, target interface{}) *gomock.Call
- func (mr *MockTransportMockRecorder) Consumer() *gomock.Call
- func (mr *MockTransportMockRecorder) DecodePeer(arg0 interface{}) *gomock.Call
- func (mr *MockTransportMockRecorder) EncodePeer(id, addr interface{}) *gomock.Call
- func (mr *MockTransportMockRecorder) InstallSnapshot(id, target, args, resp, data interface{}) *gomock.Call
- func (mr *MockTransportMockRecorder) LocalAddr() *gomock.Call
- func (mr *MockTransportMockRecorder) RequestVote(id, target, args, resp interface{}) *gomock.Call
- func (mr *MockTransportMockRecorder) SetHeartbeatHandler(cb interface{}) *gomock.Call
- func (mr *MockTransportMockRecorder) TimeoutNow(id, target, args, resp interface{}) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInMemTransport ¶
func NewInMemTransport(addr raft.ServerAddress) (raft.ServerAddress, transport.Transport)
NewInMemTransport returns in-memory transport
Types ¶
type MockTransport ¶
type MockTransport struct {
// contains filtered or unexported fields
}
MockTransport is a mock of Transport interface
func NewMockTransport ¶
func NewMockTransport(ctrl *gomock.Controller) *MockTransport
NewMockTransport creates a new mock instance
func (*MockTransport) AppendEntries ¶
func (m *MockTransport) AppendEntries(id raft.ServerID, target raft.ServerAddress, args *raft.AppendEntriesRequest, resp *raft.AppendEntriesResponse) error
AppendEntries mocks base method
func (*MockTransport) AppendEntriesPipeline ¶
func (m *MockTransport) AppendEntriesPipeline(id raft.ServerID, target raft.ServerAddress) (raft.AppendPipeline, error)
AppendEntriesPipeline mocks base method
func (*MockTransport) Consumer ¶
func (m *MockTransport) Consumer() <-chan raft.RPC
Consumer mocks base method
func (*MockTransport) DecodePeer ¶
func (m *MockTransport) DecodePeer(arg0 []byte) raft.ServerAddress
DecodePeer mocks base method
func (*MockTransport) EXPECT ¶
func (m *MockTransport) EXPECT() *MockTransportMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockTransport) EncodePeer ¶
func (m *MockTransport) EncodePeer(id raft.ServerID, addr raft.ServerAddress) []byte
EncodePeer mocks base method
func (*MockTransport) InstallSnapshot ¶
func (m *MockTransport) InstallSnapshot(id raft.ServerID, target raft.ServerAddress, args *raft.InstallSnapshotRequest, resp *raft.InstallSnapshotResponse, data io.Reader) error
InstallSnapshot mocks base method
func (*MockTransport) LocalAddr ¶
func (m *MockTransport) LocalAddr() raft.ServerAddress
LocalAddr mocks base method
func (*MockTransport) RequestVote ¶
func (m *MockTransport) RequestVote(id raft.ServerID, target raft.ServerAddress, args *raft.RequestVoteRequest, resp *raft.RequestVoteResponse) error
RequestVote mocks base method
func (*MockTransport) SetHeartbeatHandler ¶
func (m *MockTransport) SetHeartbeatHandler(cb func(raft.RPC))
SetHeartbeatHandler mocks base method
func (*MockTransport) TimeoutNow ¶
func (m *MockTransport) TimeoutNow(id raft.ServerID, target raft.ServerAddress, args *raft.TimeoutNowRequest, resp *raft.TimeoutNowResponse) error
TimeoutNow mocks base method
type MockTransportMockRecorder ¶
type MockTransportMockRecorder struct {
// contains filtered or unexported fields
}
MockTransportMockRecorder is the mock recorder for MockTransport
func (*MockTransportMockRecorder) AppendEntries ¶
func (mr *MockTransportMockRecorder) AppendEntries(id, target, args, resp interface{}) *gomock.Call
AppendEntries indicates an expected call of AppendEntries
func (*MockTransportMockRecorder) AppendEntriesPipeline ¶
func (mr *MockTransportMockRecorder) AppendEntriesPipeline(id, target interface{}) *gomock.Call
AppendEntriesPipeline indicates an expected call of AppendEntriesPipeline
func (*MockTransportMockRecorder) Consumer ¶
func (mr *MockTransportMockRecorder) Consumer() *gomock.Call
Consumer indicates an expected call of Consumer
func (*MockTransportMockRecorder) DecodePeer ¶
func (mr *MockTransportMockRecorder) DecodePeer(arg0 interface{}) *gomock.Call
DecodePeer indicates an expected call of DecodePeer
func (*MockTransportMockRecorder) EncodePeer ¶
func (mr *MockTransportMockRecorder) EncodePeer(id, addr interface{}) *gomock.Call
EncodePeer indicates an expected call of EncodePeer
func (*MockTransportMockRecorder) InstallSnapshot ¶
func (mr *MockTransportMockRecorder) InstallSnapshot(id, target, args, resp, data interface{}) *gomock.Call
InstallSnapshot indicates an expected call of InstallSnapshot
func (*MockTransportMockRecorder) LocalAddr ¶
func (mr *MockTransportMockRecorder) LocalAddr() *gomock.Call
LocalAddr indicates an expected call of LocalAddr
func (*MockTransportMockRecorder) RequestVote ¶
func (mr *MockTransportMockRecorder) RequestVote(id, target, args, resp interface{}) *gomock.Call
RequestVote indicates an expected call of RequestVote
func (*MockTransportMockRecorder) SetHeartbeatHandler ¶
func (mr *MockTransportMockRecorder) SetHeartbeatHandler(cb interface{}) *gomock.Call
SetHeartbeatHandler indicates an expected call of SetHeartbeatHandler
func (*MockTransportMockRecorder) TimeoutNow ¶
func (mr *MockTransportMockRecorder) TimeoutNow(id, target, args, resp interface{}) *gomock.Call
TimeoutNow indicates an expected call of TimeoutNow