Documentation ¶
Overview ¶
Package server is a generated GoMock package.
Package server is a generated GoMock package.
Index ¶
- func MockReset()
- func MockServerGetter(gt Getter)
- type Getter
- type Instance
- type Manager
- type MockInstance
- func (m *MockInstance) Address() string
- func (m *MockInstance) Close() error
- func (m *MockInstance) CreateBlock(arg0 context.Context, arg1 int64) (*metadata.Block, error)
- func (m *MockInstance) DeleteBlock(arg0 context.Context, arg1 vanus.ID) error
- func (m *MockInstance) EXPECT() *MockInstanceMockRecorder
- func (m *MockInstance) GetMeta() *metadata.VolumeMetadata
- func (m *MockInstance) GetServer() Server
- func (m *MockInstance) ID() vanus.ID
- func (m *MockInstance) SetServer(arg0 Server)
- type MockInstanceMockRecorder
- func (mr *MockInstanceMockRecorder) Address() *gomock.Call
- func (mr *MockInstanceMockRecorder) Close() *gomock.Call
- func (mr *MockInstanceMockRecorder) CreateBlock(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockInstanceMockRecorder) DeleteBlock(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockInstanceMockRecorder) GetMeta() *gomock.Call
- func (mr *MockInstanceMockRecorder) GetServer() *gomock.Call
- func (mr *MockInstanceMockRecorder) ID() *gomock.Call
- func (mr *MockInstanceMockRecorder) SetServer(arg0 interface{}) *gomock.Call
- type MockManager
- func (m *MockManager) AddServer(ctx context.Context, srv Server) error
- func (m *MockManager) CanCreateEventbus(ctx context.Context, replicaNum int) bool
- func (m *MockManager) EXPECT() *MockManagerMockRecorder
- func (m *MockManager) GetServerByAddress(addr string) Server
- func (m *MockManager) GetServerByVolumeID(id uint64) Server
- func (m *MockManager) RemoveServer(ctx context.Context, srv Server) error
- func (m *MockManager) Run(ctx context.Context) error
- func (m *MockManager) Stop(ctx context.Context)
- type MockManagerMockRecorder
- func (mr *MockManagerMockRecorder) AddServer(ctx, srv interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) CanCreateEventbus(ctx, replicaNum interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) GetServerByAddress(addr interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) GetServerByVolumeID(id interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) RemoveServer(ctx, srv interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) Run(ctx interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) Stop(ctx interface{}) *gomock.Call
- type MockServer
- func (m *MockServer) Address() string
- func (m *MockServer) Close() error
- func (m *MockServer) EXPECT() *MockServerMockRecorder
- func (m *MockServer) GetClient() segment.SegmentServerClient
- func (m *MockServer) IsActive(ctx context.Context) bool
- func (m *MockServer) Polish()
- func (m *MockServer) RemoteStart(ctx context.Context) error
- func (m *MockServer) RemoteStop(ctx context.Context)
- func (m *MockServer) Uptime() time.Time
- func (m *MockServer) VolumeID() uint64
- type MockServerMockRecorder
- func (mr *MockServerMockRecorder) Address() *gomock.Call
- func (mr *MockServerMockRecorder) Close() *gomock.Call
- func (mr *MockServerMockRecorder) GetClient() *gomock.Call
- func (mr *MockServerMockRecorder) IsActive(ctx interface{}) *gomock.Call
- func (mr *MockServerMockRecorder) Polish() *gomock.Call
- func (mr *MockServerMockRecorder) RemoteStart(ctx interface{}) *gomock.Call
- func (mr *MockServerMockRecorder) RemoteStop(ctx interface{}) *gomock.Call
- func (mr *MockServerMockRecorder) Uptime() *gomock.Call
- func (mr *MockServerMockRecorder) VolumeID() *gomock.Call
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MockServerGetter ¶
func MockServerGetter(gt Getter)
Types ¶
type Instance ¶
type Instance interface { ID() vanus.ID Address() string Close() error GetMeta() *metadata.VolumeMetadata CreateBlock(context.Context, int64) (*metadata.Block, error) DeleteBlock(context.Context, vanus.ID) error GetServer() Server SetServer(Server) }
func NewInstance ¶
func NewInstance(md *metadata.VolumeMetadata) Instance
type Manager ¶
type Manager interface { AddServer(ctx context.Context, srv Server) error RemoveServer(ctx context.Context, srv Server) error GetServerByAddress(addr string) Server GetServerByVolumeID(id uint64) Server Run(ctx context.Context) error Stop(ctx context.Context) CanCreateEventbus(ctx context.Context, replicaNum int) bool }
func NewServerManager ¶
func NewServerManager() Manager
type MockInstance ¶
type MockInstance struct {
// contains filtered or unexported fields
}
MockInstance is a mock of Instance interface.
func NewMockInstance ¶
func NewMockInstance(ctrl *gomock.Controller) *MockInstance
NewMockInstance creates a new mock instance.
func (*MockInstance) CreateBlock ¶
CreateBlock mocks base method.
func (*MockInstance) DeleteBlock ¶
DeleteBlock mocks base method.
func (*MockInstance) EXPECT ¶
func (m *MockInstance) EXPECT() *MockInstanceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockInstance) GetMeta ¶
func (m *MockInstance) GetMeta() *metadata.VolumeMetadata
GetMeta mocks base method.
func (*MockInstance) GetServer ¶
func (m *MockInstance) GetServer() Server
GetServer mocks base method.
func (*MockInstance) SetServer ¶
func (m *MockInstance) SetServer(arg0 Server)
SetServer mocks base method.
type MockInstanceMockRecorder ¶
type MockInstanceMockRecorder struct {
// contains filtered or unexported fields
}
MockInstanceMockRecorder is the mock recorder for MockInstance.
func (*MockInstanceMockRecorder) Address ¶
func (mr *MockInstanceMockRecorder) Address() *gomock.Call
Address indicates an expected call of Address.
func (*MockInstanceMockRecorder) Close ¶
func (mr *MockInstanceMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockInstanceMockRecorder) CreateBlock ¶
func (mr *MockInstanceMockRecorder) CreateBlock(arg0, arg1 interface{}) *gomock.Call
CreateBlock indicates an expected call of CreateBlock.
func (*MockInstanceMockRecorder) DeleteBlock ¶
func (mr *MockInstanceMockRecorder) DeleteBlock(arg0, arg1 interface{}) *gomock.Call
DeleteBlock indicates an expected call of DeleteBlock.
func (*MockInstanceMockRecorder) GetMeta ¶
func (mr *MockInstanceMockRecorder) GetMeta() *gomock.Call
GetMeta indicates an expected call of GetMeta.
func (*MockInstanceMockRecorder) GetServer ¶
func (mr *MockInstanceMockRecorder) GetServer() *gomock.Call
GetServer indicates an expected call of GetServer.
func (*MockInstanceMockRecorder) ID ¶
func (mr *MockInstanceMockRecorder) ID() *gomock.Call
ID indicates an expected call of ID.
func (*MockInstanceMockRecorder) SetServer ¶
func (mr *MockInstanceMockRecorder) SetServer(arg0 interface{}) *gomock.Call
SetServer indicates an expected call of SetServer.
type MockManager ¶
type MockManager struct {
// contains filtered or unexported fields
}
MockManager is a mock of Manager interface.
func NewMockManager ¶
func NewMockManager(ctrl *gomock.Controller) *MockManager
NewMockManager creates a new mock instance.
func (*MockManager) AddServer ¶
func (m *MockManager) AddServer(ctx context.Context, srv Server) error
AddServer mocks base method.
func (*MockManager) CanCreateEventbus ¶
func (m *MockManager) CanCreateEventbus(ctx context.Context, replicaNum int) bool
CanCreateEventbus mocks base method.
func (*MockManager) EXPECT ¶
func (m *MockManager) EXPECT() *MockManagerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockManager) GetServerByAddress ¶
func (m *MockManager) GetServerByAddress(addr string) Server
GetServerByAddress mocks base method.
func (*MockManager) GetServerByVolumeID ¶
func (m *MockManager) GetServerByVolumeID(id uint64) Server
GetServerByVolumeID mocks base method.
func (*MockManager) RemoveServer ¶
func (m *MockManager) RemoveServer(ctx context.Context, srv Server) error
RemoveServer mocks base method.
type MockManagerMockRecorder ¶
type MockManagerMockRecorder struct {
// contains filtered or unexported fields
}
MockManagerMockRecorder is the mock recorder for MockManager.
func (*MockManagerMockRecorder) AddServer ¶
func (mr *MockManagerMockRecorder) AddServer(ctx, srv interface{}) *gomock.Call
AddServer indicates an expected call of AddServer.
func (*MockManagerMockRecorder) CanCreateEventbus ¶
func (mr *MockManagerMockRecorder) CanCreateEventbus(ctx, replicaNum interface{}) *gomock.Call
CanCreateEventbus indicates an expected call of CanCreateEventbus.
func (*MockManagerMockRecorder) GetServerByAddress ¶
func (mr *MockManagerMockRecorder) GetServerByAddress(addr interface{}) *gomock.Call
GetServerByAddress indicates an expected call of GetServerByAddress.
func (*MockManagerMockRecorder) GetServerByVolumeID ¶
func (mr *MockManagerMockRecorder) GetServerByVolumeID(id interface{}) *gomock.Call
GetServerByVolumeID indicates an expected call of GetServerByVolumeID.
func (*MockManagerMockRecorder) RemoveServer ¶
func (mr *MockManagerMockRecorder) RemoveServer(ctx, srv interface{}) *gomock.Call
RemoveServer indicates an expected call of RemoveServer.
func (*MockManagerMockRecorder) Run ¶
func (mr *MockManagerMockRecorder) Run(ctx interface{}) *gomock.Call
Run indicates an expected call of Run.
func (*MockManagerMockRecorder) Stop ¶
func (mr *MockManagerMockRecorder) Stop(ctx interface{}) *gomock.Call
Stop indicates an expected call of Stop.
type MockServer ¶
type MockServer struct {
// contains filtered or unexported fields
}
MockServer is a mock of Server interface.
func NewMockServer ¶
func NewMockServer(ctrl *gomock.Controller) *MockServer
NewMockServer creates a new mock instance.
func (*MockServer) EXPECT ¶
func (m *MockServer) EXPECT() *MockServerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockServer) GetClient ¶
func (m *MockServer) GetClient() segment.SegmentServerClient
GetClient mocks base method.
func (*MockServer) IsActive ¶
func (m *MockServer) IsActive(ctx context.Context) bool
IsActive mocks base method.
func (*MockServer) RemoteStart ¶
func (m *MockServer) RemoteStart(ctx context.Context) error
RemoteStart mocks base method.
func (*MockServer) RemoteStop ¶
func (m *MockServer) RemoteStop(ctx context.Context)
RemoteStop mocks base method.
type MockServerMockRecorder ¶
type MockServerMockRecorder struct {
// contains filtered or unexported fields
}
MockServerMockRecorder is the mock recorder for MockServer.
func (*MockServerMockRecorder) Address ¶
func (mr *MockServerMockRecorder) Address() *gomock.Call
Address indicates an expected call of Address.
func (*MockServerMockRecorder) Close ¶
func (mr *MockServerMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockServerMockRecorder) GetClient ¶
func (mr *MockServerMockRecorder) GetClient() *gomock.Call
GetClient indicates an expected call of GetClient.
func (*MockServerMockRecorder) IsActive ¶
func (mr *MockServerMockRecorder) IsActive(ctx interface{}) *gomock.Call
IsActive indicates an expected call of IsActive.
func (*MockServerMockRecorder) Polish ¶
func (mr *MockServerMockRecorder) Polish() *gomock.Call
Polish indicates an expected call of Polish.
func (*MockServerMockRecorder) RemoteStart ¶
func (mr *MockServerMockRecorder) RemoteStart(ctx interface{}) *gomock.Call
RemoteStart indicates an expected call of RemoteStart.
func (*MockServerMockRecorder) RemoteStop ¶
func (mr *MockServerMockRecorder) RemoteStop(ctx interface{}) *gomock.Call
RemoteStop indicates an expected call of RemoteStop.
func (*MockServerMockRecorder) Uptime ¶
func (mr *MockServerMockRecorder) Uptime() *gomock.Call
Uptime indicates an expected call of Uptime.
func (*MockServerMockRecorder) VolumeID ¶
func (mr *MockServerMockRecorder) VolumeID() *gomock.Call
VolumeID indicates an expected call of VolumeID.