1
// Code generated by MockGen. DO NOT EDIT.
2
// Source: github.com/cubefs/cubefs/blobstore/access/controller (interfaces: ClusterController,ServiceController,VolumeGetter)
4
// Package access is a generated GoMock package.
11
controller "github.com/cubefs/cubefs/blobstore/access/controller"
12
clustermgr "github.com/cubefs/cubefs/blobstore/api/clustermgr"
13
proto "github.com/cubefs/cubefs/blobstore/common/proto"
14
gomock "github.com/golang/mock/gomock"
17
// MockClusterController is a mock of ClusterController interface.
18
type MockClusterController struct {
19
ctrl *gomock.Controller
20
recorder *MockClusterControllerMockRecorder
23
// MockClusterControllerMockRecorder is the mock recorder for MockClusterController.
24
type MockClusterControllerMockRecorder struct {
25
mock *MockClusterController
28
// NewMockClusterController creates a new mock instance.
29
func NewMockClusterController(ctrl *gomock.Controller) *MockClusterController {
30
mock := &MockClusterController{ctrl: ctrl}
31
mock.recorder = &MockClusterControllerMockRecorder{mock}
35
// EXPECT returns an object that allows the caller to indicate expected use.
36
func (m *MockClusterController) EXPECT() *MockClusterControllerMockRecorder {
40
// All mocks base method.
41
func (m *MockClusterController) All() []*clustermgr.ClusterInfo {
43
ret := m.ctrl.Call(m, "All")
44
ret0, _ := ret[0].([]*clustermgr.ClusterInfo)
48
// All indicates an expected call of All.
49
func (mr *MockClusterControllerMockRecorder) All() *gomock.Call {
50
mr.mock.ctrl.T.Helper()
51
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "All", reflect.TypeOf((*MockClusterController)(nil).All))
54
// ChangeChooseAlg mocks base method.
55
func (m *MockClusterController) ChangeChooseAlg(arg0 controller.AlgChoose) error {
57
ret := m.ctrl.Call(m, "ChangeChooseAlg", arg0)
58
ret0, _ := ret[0].(error)
62
// ChangeChooseAlg indicates an expected call of ChangeChooseAlg.
63
func (mr *MockClusterControllerMockRecorder) ChangeChooseAlg(arg0 interface{}) *gomock.Call {
64
mr.mock.ctrl.T.Helper()
65
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeChooseAlg", reflect.TypeOf((*MockClusterController)(nil).ChangeChooseAlg), arg0)
68
// ChooseOne mocks base method.
69
func (m *MockClusterController) ChooseOne() (*clustermgr.ClusterInfo, error) {
71
ret := m.ctrl.Call(m, "ChooseOne")
72
ret0, _ := ret[0].(*clustermgr.ClusterInfo)
73
ret1, _ := ret[1].(error)
77
// ChooseOne indicates an expected call of ChooseOne.
78
func (mr *MockClusterControllerMockRecorder) ChooseOne() *gomock.Call {
79
mr.mock.ctrl.T.Helper()
80
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChooseOne", reflect.TypeOf((*MockClusterController)(nil).ChooseOne))
83
// GetConfig mocks base method.
84
func (m *MockClusterController) GetConfig(arg0 context.Context, arg1 string) (string, error) {
86
ret := m.ctrl.Call(m, "GetConfig", arg0, arg1)
87
ret0, _ := ret[0].(string)
88
ret1, _ := ret[1].(error)
92
// GetConfig indicates an expected call of GetConfig.
93
func (mr *MockClusterControllerMockRecorder) GetConfig(arg0, arg1 interface{}) *gomock.Call {
94
mr.mock.ctrl.T.Helper()
95
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConfig", reflect.TypeOf((*MockClusterController)(nil).GetConfig), arg0, arg1)
98
// GetServiceController mocks base method.
99
func (m *MockClusterController) GetServiceController(arg0 proto.ClusterID) (controller.ServiceController, error) {
101
ret := m.ctrl.Call(m, "GetServiceController", arg0)
102
ret0, _ := ret[0].(controller.ServiceController)
103
ret1, _ := ret[1].(error)
107
// GetServiceController indicates an expected call of GetServiceController.
108
func (mr *MockClusterControllerMockRecorder) GetServiceController(arg0 interface{}) *gomock.Call {
109
mr.mock.ctrl.T.Helper()
110
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServiceController", reflect.TypeOf((*MockClusterController)(nil).GetServiceController), arg0)
113
// GetVolumeGetter mocks base method.
114
func (m *MockClusterController) GetVolumeGetter(arg0 proto.ClusterID) (controller.VolumeGetter, error) {
116
ret := m.ctrl.Call(m, "GetVolumeGetter", arg0)
117
ret0, _ := ret[0].(controller.VolumeGetter)
118
ret1, _ := ret[1].(error)
122
// GetVolumeGetter indicates an expected call of GetVolumeGetter.
123
func (mr *MockClusterControllerMockRecorder) GetVolumeGetter(arg0 interface{}) *gomock.Call {
124
mr.mock.ctrl.T.Helper()
125
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVolumeGetter", reflect.TypeOf((*MockClusterController)(nil).GetVolumeGetter), arg0)
128
// Region mocks base method.
129
func (m *MockClusterController) Region() string {
131
ret := m.ctrl.Call(m, "Region")
132
ret0, _ := ret[0].(string)
136
// Region indicates an expected call of Region.
137
func (mr *MockClusterControllerMockRecorder) Region() *gomock.Call {
138
mr.mock.ctrl.T.Helper()
139
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Region", reflect.TypeOf((*MockClusterController)(nil).Region))
142
// MockServiceController is a mock of ServiceController interface.
143
type MockServiceController struct {
144
ctrl *gomock.Controller
145
recorder *MockServiceControllerMockRecorder
148
// MockServiceControllerMockRecorder is the mock recorder for MockServiceController.
149
type MockServiceControllerMockRecorder struct {
150
mock *MockServiceController
153
// NewMockServiceController creates a new mock instance.
154
func NewMockServiceController(ctrl *gomock.Controller) *MockServiceController {
155
mock := &MockServiceController{ctrl: ctrl}
156
mock.recorder = &MockServiceControllerMockRecorder{mock}
160
// EXPECT returns an object that allows the caller to indicate expected use.
161
func (m *MockServiceController) EXPECT() *MockServiceControllerMockRecorder {
165
// GetDiskHost mocks base method.
166
func (m *MockServiceController) GetDiskHost(arg0 context.Context, arg1 proto.DiskID) (*controller.HostIDC, error) {
168
ret := m.ctrl.Call(m, "GetDiskHost", arg0, arg1)
169
ret0, _ := ret[0].(*controller.HostIDC)
170
ret1, _ := ret[1].(error)
174
// GetDiskHost indicates an expected call of GetDiskHost.
175
func (mr *MockServiceControllerMockRecorder) GetDiskHost(arg0, arg1 interface{}) *gomock.Call {
176
mr.mock.ctrl.T.Helper()
177
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDiskHost", reflect.TypeOf((*MockServiceController)(nil).GetDiskHost), arg0, arg1)
180
// GetServiceHost mocks base method.
181
func (m *MockServiceController) GetServiceHost(arg0 context.Context, arg1 string) (string, error) {
183
ret := m.ctrl.Call(m, "GetServiceHost", arg0, arg1)
184
ret0, _ := ret[0].(string)
185
ret1, _ := ret[1].(error)
189
// GetServiceHost indicates an expected call of GetServiceHost.
190
func (mr *MockServiceControllerMockRecorder) GetServiceHost(arg0, arg1 interface{}) *gomock.Call {
191
mr.mock.ctrl.T.Helper()
192
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServiceHost", reflect.TypeOf((*MockServiceController)(nil).GetServiceHost), arg0, arg1)
195
// GetServiceHosts mocks base method.
196
func (m *MockServiceController) GetServiceHosts(arg0 context.Context, arg1 string) ([]string, error) {
198
ret := m.ctrl.Call(m, "GetServiceHosts", arg0, arg1)
199
ret0, _ := ret[0].([]string)
200
ret1, _ := ret[1].(error)
204
// GetServiceHosts indicates an expected call of GetServiceHosts.
205
func (mr *MockServiceControllerMockRecorder) GetServiceHosts(arg0, arg1 interface{}) *gomock.Call {
206
mr.mock.ctrl.T.Helper()
207
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServiceHosts", reflect.TypeOf((*MockServiceController)(nil).GetServiceHosts), arg0, arg1)
210
// PunishDisk mocks base method.
211
func (m *MockServiceController) PunishDisk(arg0 context.Context, arg1 proto.DiskID, arg2 int) {
213
m.ctrl.Call(m, "PunishDisk", arg0, arg1, arg2)
216
// PunishDisk indicates an expected call of PunishDisk.
217
func (mr *MockServiceControllerMockRecorder) PunishDisk(arg0, arg1, arg2 interface{}) *gomock.Call {
218
mr.mock.ctrl.T.Helper()
219
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PunishDisk", reflect.TypeOf((*MockServiceController)(nil).PunishDisk), arg0, arg1, arg2)
222
// PunishDiskWithThreshold mocks base method.
223
func (m *MockServiceController) PunishDiskWithThreshold(arg0 context.Context, arg1 proto.DiskID, arg2 int) {
225
m.ctrl.Call(m, "PunishDiskWithThreshold", arg0, arg1, arg2)
228
// PunishDiskWithThreshold indicates an expected call of PunishDiskWithThreshold.
229
func (mr *MockServiceControllerMockRecorder) PunishDiskWithThreshold(arg0, arg1, arg2 interface{}) *gomock.Call {
230
mr.mock.ctrl.T.Helper()
231
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PunishDiskWithThreshold", reflect.TypeOf((*MockServiceController)(nil).PunishDiskWithThreshold), arg0, arg1, arg2)
234
// PunishService mocks base method.
235
func (m *MockServiceController) PunishService(arg0 context.Context, arg1, arg2 string, arg3 int) {
237
m.ctrl.Call(m, "PunishService", arg0, arg1, arg2, arg3)
240
// PunishService indicates an expected call of PunishService.
241
func (mr *MockServiceControllerMockRecorder) PunishService(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
242
mr.mock.ctrl.T.Helper()
243
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PunishService", reflect.TypeOf((*MockServiceController)(nil).PunishService), arg0, arg1, arg2, arg3)
246
// PunishServiceWithThreshold mocks base method.
247
func (m *MockServiceController) PunishServiceWithThreshold(arg0 context.Context, arg1, arg2 string, arg3 int) {
249
m.ctrl.Call(m, "PunishServiceWithThreshold", arg0, arg1, arg2, arg3)
252
// PunishServiceWithThreshold indicates an expected call of PunishServiceWithThreshold.
253
func (mr *MockServiceControllerMockRecorder) PunishServiceWithThreshold(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
254
mr.mock.ctrl.T.Helper()
255
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PunishServiceWithThreshold", reflect.TypeOf((*MockServiceController)(nil).PunishServiceWithThreshold), arg0, arg1, arg2, arg3)
258
// MockVolumeGetter is a mock of VolumeGetter interface.
259
type MockVolumeGetter struct {
260
ctrl *gomock.Controller
261
recorder *MockVolumeGetterMockRecorder
264
// MockVolumeGetterMockRecorder is the mock recorder for MockVolumeGetter.
265
type MockVolumeGetterMockRecorder struct {
266
mock *MockVolumeGetter
269
// NewMockVolumeGetter creates a new mock instance.
270
func NewMockVolumeGetter(ctrl *gomock.Controller) *MockVolumeGetter {
271
mock := &MockVolumeGetter{ctrl: ctrl}
272
mock.recorder = &MockVolumeGetterMockRecorder{mock}
276
// EXPECT returns an object that allows the caller to indicate expected use.
277
func (m *MockVolumeGetter) EXPECT() *MockVolumeGetterMockRecorder {
281
// Get mocks base method.
282
func (m *MockVolumeGetter) Get(arg0 context.Context, arg1 proto.Vid, arg2 bool) *controller.VolumePhy {
284
ret := m.ctrl.Call(m, "Get", arg0, arg1, arg2)
285
ret0, _ := ret[0].(*controller.VolumePhy)
289
// Get indicates an expected call of Get.
290
func (mr *MockVolumeGetterMockRecorder) Get(arg0, arg1, arg2 interface{}) *gomock.Call {
291
mr.mock.ctrl.T.Helper()
292
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockVolumeGetter)(nil).Get), arg0, arg1, arg2)
295
// Punish mocks base method.
296
func (m *MockVolumeGetter) Punish(arg0 context.Context, arg1 proto.Vid, arg2 int) {
298
m.ctrl.Call(m, "Punish", arg0, arg1, arg2)
301
// Punish indicates an expected call of Punish.
302
func (mr *MockVolumeGetterMockRecorder) Punish(arg0, arg1, arg2 interface{}) *gomock.Call {
303
mr.mock.ctrl.T.Helper()
304
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Punish", reflect.TypeOf((*MockVolumeGetter)(nil).Punish), arg0, arg1, arg2)