Documentation ¶
Overview ¶
Package raftlease implements the API for sending raft lease messages between api servers.
Package raftlease is a generated GoMock package.
Index ¶
- type API
- type Client
- type ClientMetrics
- type Config
- type Logger
- type MockRaftLeaseApplier
- type MockRaftLeaseApplierMockRecorder
- type MockRemote
- func (m *MockRemote) Address() string
- func (m *MockRemote) EXPECT() *MockRemoteMockRecorder
- func (m *MockRemote) ID() string
- func (m *MockRemote) Kill()
- func (m *MockRemote) Request(arg0 context.Context, arg1 *raftlease.Command) error
- func (m *MockRemote) SetAddress(arg0 string)
- func (m *MockRemote) Wait() error
- type MockRemoteMockRecorder
- func (mr *MockRemoteMockRecorder) Address() *gomock.Call
- func (mr *MockRemoteMockRecorder) ID() *gomock.Call
- func (mr *MockRemoteMockRecorder) Kill() *gomock.Call
- func (mr *MockRemoteMockRecorder) Request(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockRemoteMockRecorder) SetAddress(arg0 interface{}) *gomock.Call
- func (mr *MockRemoteMockRecorder) Wait() *gomock.Call
- type RaftLeaseApplier
- type Remote
- type RemoteConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API provides access to the pubsub API.
func (*API) ApplyLease ¶
ApplyLease attempts to apply a lease against the given controller. If the controller is not the leader, then an error to redirect to a new leader will be given.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type ClientMetrics ¶
ClientMetrics represents the metrics during a client request.
type Config ¶
type Logger ¶
type Logger interface { Errorf(string, ...interface{}) Warningf(string, ...interface{}) Infof(string, ...interface{}) Debugf(string, ...interface{}) Tracef(string, ...interface{}) }
Logger is a in place interface to represent a logger for consuming.
type MockRaftLeaseApplier ¶
type MockRaftLeaseApplier struct {
// contains filtered or unexported fields
}
MockRaftLeaseApplier is a mock of RaftLeaseApplier interface.
func NewMockRaftLeaseApplier ¶
func NewMockRaftLeaseApplier(ctrl *gomock.Controller) *MockRaftLeaseApplier
NewMockRaftLeaseApplier creates a new mock instance.
func (*MockRaftLeaseApplier) ApplyLease ¶
func (m *MockRaftLeaseApplier) ApplyLease(arg0 string) error
ApplyLease mocks base method.
func (*MockRaftLeaseApplier) EXPECT ¶
func (m *MockRaftLeaseApplier) EXPECT() *MockRaftLeaseApplierMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockRaftLeaseApplierMockRecorder ¶
type MockRaftLeaseApplierMockRecorder struct {
// contains filtered or unexported fields
}
MockRaftLeaseApplierMockRecorder is the mock recorder for MockRaftLeaseApplier.
func (*MockRaftLeaseApplierMockRecorder) ApplyLease ¶
func (mr *MockRaftLeaseApplierMockRecorder) ApplyLease(arg0 interface{}) *gomock.Call
ApplyLease indicates an expected call of ApplyLease.
type MockRemote ¶
type MockRemote struct {
// contains filtered or unexported fields
}
MockRemote is a mock of Remote interface.
func NewMockRemote ¶
func NewMockRemote(ctrl *gomock.Controller) *MockRemote
NewMockRemote creates a new mock instance.
func (*MockRemote) EXPECT ¶
func (m *MockRemote) EXPECT() *MockRemoteMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockRemote) SetAddress ¶
func (m *MockRemote) SetAddress(arg0 string)
SetAddress mocks base method.
type MockRemoteMockRecorder ¶
type MockRemoteMockRecorder struct {
// contains filtered or unexported fields
}
MockRemoteMockRecorder is the mock recorder for MockRemote.
func (*MockRemoteMockRecorder) Address ¶
func (mr *MockRemoteMockRecorder) Address() *gomock.Call
Address indicates an expected call of Address.
func (*MockRemoteMockRecorder) ID ¶
func (mr *MockRemoteMockRecorder) ID() *gomock.Call
ID indicates an expected call of ID.
func (*MockRemoteMockRecorder) Kill ¶
func (mr *MockRemoteMockRecorder) Kill() *gomock.Call
Kill indicates an expected call of Kill.
func (*MockRemoteMockRecorder) Request ¶
func (mr *MockRemoteMockRecorder) Request(arg0, arg1 interface{}) *gomock.Call
Request indicates an expected call of Request.
func (*MockRemoteMockRecorder) SetAddress ¶
func (mr *MockRemoteMockRecorder) SetAddress(arg0 interface{}) *gomock.Call
SetAddress indicates an expected call of SetAddress.
func (*MockRemoteMockRecorder) Wait ¶
func (mr *MockRemoteMockRecorder) Wait() *gomock.Call
Wait indicates an expected call of Wait.
type RaftLeaseApplier ¶
RaftLeaseApplier defines a client for applying leases.
type Remote ¶
type Remote interface { worker.Worker ID() string Address() string SetAddress(string) Request(context.Context, *raftlease.Command) error }
Remote defines an interface for managing remote connections for the client.
func NewRemote ¶
func NewRemote(config RemoteConfig) Remote
NewRemote creates a new Remote from a given address.