Compare commits

...

2 Commits

Author SHA1 Message Date
Jasper Van 5e547f2283
Merge 6c51a03a76 into eb3adf0f0a 2025-05-29 06:57:10 +08:00
saltbo 6c51a03a76
fix: update the mock package
Signed-off-by: saltbo <saltbo@foxmail.com>
2025-05-27 16:30:02 +08:00
6 changed files with 303 additions and 281 deletions

View File

@ -21,7 +21,7 @@ import (
"github.com/nacos-group/nacos-sdk-go/v2/common/http_agent" "github.com/nacos-group/nacos-sdk-go/v2/common/http_agent"
) )
//go:generate mockgen -destination mock_nacos_client_interface.go -package nacos_client -source=./nacos_client_interface.go //go:generate mockgen -destination ../../mock/mock_nacos_client_interface.go -package mock -source=./nacos_client_interface.go
type INacosClient interface { type INacosClient interface {

View File

@ -21,7 +21,7 @@ import (
"github.com/nacos-group/nacos-sdk-go/v2/vo" "github.com/nacos-group/nacos-sdk-go/v2/vo"
) )
//go:generate mockgen -destination ../../mock/mock_service_client_interface.go -package mock -source=./service_client_interface.go //go:generate mockgen -destination ../../mock/mock_naming_client_interface.go -package mock -source=./naming_client_interface.go
// INamingClient interface for naming client // INamingClient interface for naming client
type INamingClient interface { type INamingClient interface {

View File

@ -1,21 +1,5 @@
/*
* Copyright 1999-2020 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Code generated by MockGen. DO NOT EDIT. // Code generated by MockGen. DO NOT EDIT.
// Source: clients/config_client/config_client_interface.go // Source: ./config_client_interface.go
// Package mock is a generated GoMock package. // Package mock is a generated GoMock package.
package mock package mock
@ -24,63 +8,60 @@ import (
reflect "reflect" reflect "reflect"
gomock "github.com/golang/mock/gomock" gomock "github.com/golang/mock/gomock"
model "github.com/nacos-group/nacos-sdk-go/v2/model"
vo "github.com/nacos-group/nacos-sdk-go/v2/vo" vo "github.com/nacos-group/nacos-sdk-go/v2/vo"
) )
// MockIConfigClient is a mock of IConfigClient interface // MockIConfigClient is a mock of IConfigClient interface.
type MockIConfigClient struct { type MockIConfigClient struct {
ctrl *gomock.Controller ctrl *gomock.Controller
recorder *MockIConfigClientMockRecorder recorder *MockIConfigClientMockRecorder
} }
// MockIConfigClientMockRecorder is the mock recorder for MockIConfigClient // MockIConfigClientMockRecorder is the mock recorder for MockIConfigClient.
type MockIConfigClientMockRecorder struct { type MockIConfigClientMockRecorder struct {
mock *MockIConfigClient mock *MockIConfigClient
} }
// NewMockIConfigClient creates a new mock instance // NewMockIConfigClient creates a new mock instance.
func NewMockIConfigClient(ctrl *gomock.Controller) *MockIConfigClient { func NewMockIConfigClient(ctrl *gomock.Controller) *MockIConfigClient {
mock := &MockIConfigClient{ctrl: ctrl} mock := &MockIConfigClient{ctrl: ctrl}
mock.recorder = &MockIConfigClientMockRecorder{mock} mock.recorder = &MockIConfigClientMockRecorder{mock}
return mock return mock
} }
// EXPECT returns an object that allows the caller to indicate expected use // EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockIConfigClient) EXPECT() *MockIConfigClientMockRecorder { func (m *MockIConfigClient) EXPECT() *MockIConfigClientMockRecorder {
return m.recorder return m.recorder
} }
// GetConfig mocks base method // CancelListenConfig mocks base method.
func (m *MockIConfigClient) GetConfig(param vo.ConfigParam) (string, error) { func (m *MockIConfigClient) CancelListenConfig(params vo.ConfigParam) error {
m.ctrl.T.Helper() m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetConfig", param) ret := m.ctrl.Call(m, "CancelListenConfig", params)
ret0, _ := ret[0].(string) ret0, _ := ret[0].(error)
ret1, _ := ret[1].(error) return ret0
return ret0, ret1
} }
// GetConfig indicates an expected call of GetConfig // CancelListenConfig indicates an expected call of CancelListenConfig.
func (mr *MockIConfigClientMockRecorder) GetConfig(param interface{}) *gomock.Call { func (mr *MockIConfigClientMockRecorder) CancelListenConfig(params interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper() mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConfig", reflect.TypeOf((*MockIConfigClient)(nil).GetConfig), param) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelListenConfig", reflect.TypeOf((*MockIConfigClient)(nil).CancelListenConfig), params)
} }
// PublishConfig mocks base method // CloseClient mocks base method.
func (m *MockIConfigClient) PublishConfig(param vo.ConfigParam) (bool, error) { func (m *MockIConfigClient) CloseClient() {
m.ctrl.T.Helper() m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PublishConfig", param) m.ctrl.Call(m, "CloseClient")
ret0, _ := ret[0].(bool)
ret1, _ := ret[1].(error)
return ret0, ret1
} }
// PublishConfig indicates an expected call of PublishConfig // CloseClient indicates an expected call of CloseClient.
func (mr *MockIConfigClientMockRecorder) PublishConfig(param interface{}) *gomock.Call { func (mr *MockIConfigClientMockRecorder) CloseClient() *gomock.Call {
mr.mock.ctrl.T.Helper() mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublishConfig", reflect.TypeOf((*MockIConfigClient)(nil).PublishConfig), param) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseClient", reflect.TypeOf((*MockIConfigClient)(nil).CloseClient))
} }
// DeleteConfig mocks base method // DeleteConfig mocks base method.
func (m *MockIConfigClient) DeleteConfig(param vo.ConfigParam) (bool, error) { func (m *MockIConfigClient) DeleteConfig(param vo.ConfigParam) (bool, error) {
m.ctrl.T.Helper() m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteConfig", param) ret := m.ctrl.Call(m, "DeleteConfig", param)
@ -89,63 +70,67 @@ func (m *MockIConfigClient) DeleteConfig(param vo.ConfigParam) (bool, error) {
return ret0, ret1 return ret0, ret1
} }
// DeleteConfig indicates an expected call of DeleteConfig // DeleteConfig indicates an expected call of DeleteConfig.
func (mr *MockIConfigClientMockRecorder) DeleteConfig(param interface{}) *gomock.Call { func (mr *MockIConfigClientMockRecorder) DeleteConfig(param interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper() mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteConfig", reflect.TypeOf((*MockIConfigClient)(nil).DeleteConfig), param) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteConfig", reflect.TypeOf((*MockIConfigClient)(nil).DeleteConfig), param)
} }
// ListenConfig mocks base method // GetConfig mocks base method.
func (m *MockIConfigClient) ListenConfig(params []vo.ConfigParam) error { func (m *MockIConfigClient) GetConfig(param vo.ConfigParam) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetConfig", param)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetConfig indicates an expected call of GetConfig.
func (mr *MockIConfigClientMockRecorder) GetConfig(param interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConfig", reflect.TypeOf((*MockIConfigClient)(nil).GetConfig), param)
}
// ListenConfig mocks base method.
func (m *MockIConfigClient) ListenConfig(params vo.ConfigParam) error {
m.ctrl.T.Helper() m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ListenConfig", params) ret := m.ctrl.Call(m, "ListenConfig", params)
ret0, _ := ret[0].(error) ret0, _ := ret[0].(error)
return ret0 return ret0
} }
// ListenConfig indicates an expected call of ListenConfig // ListenConfig indicates an expected call of ListenConfig.
func (mr *MockIConfigClientMockRecorder) ListenConfig(params interface{}) *gomock.Call { func (mr *MockIConfigClientMockRecorder) ListenConfig(params interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper() mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListenConfig", reflect.TypeOf((*MockIConfigClient)(nil).ListenConfig), params) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListenConfig", reflect.TypeOf((*MockIConfigClient)(nil).ListenConfig), params)
} }
// AddConfigToListen mocks base method // PublishConfig mocks base method.
func (m *MockIConfigClient) AddConfigToListen(params []vo.ConfigParam) error { func (m *MockIConfigClient) PublishConfig(param vo.ConfigParam) (bool, error) {
m.ctrl.T.Helper() m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AddConfigToListen", params) ret := m.ctrl.Call(m, "PublishConfig", param)
ret0, _ := ret[0].(error) ret0, _ := ret[0].(bool)
return ret0
}
// AddConfigToListen indicates an expected call of AddConfigToListen
func (mr *MockIConfigClientMockRecorder) AddConfigToListen(params interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddConfigToListen", reflect.TypeOf((*MockIConfigClient)(nil).AddConfigToListen), params)
}
// StopListenConfig mocks base method
func (m *MockIConfigClient) StopListenConfig() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "StopListenConfig")
}
// StopListenConfig indicates an expected call of StopListenConfig
func (mr *MockIConfigClientMockRecorder) StopListenConfig() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopListenConfig", reflect.TypeOf((*MockIConfigClient)(nil).StopListenConfig))
}
// GetConfigContent mocks base method
func (m *MockIConfigClient) GetConfigContent(dataId, groupId string) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetConfigContent", dataId, groupId)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error) ret1, _ := ret[1].(error)
return ret0, ret1 return ret0, ret1
} }
// GetConfigContent indicates an expected call of GetConfigContent // PublishConfig indicates an expected call of PublishConfig.
func (mr *MockIConfigClientMockRecorder) GetConfigContent(dataId, groupId interface{}) *gomock.Call { func (mr *MockIConfigClientMockRecorder) PublishConfig(param interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper() mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConfigContent", reflect.TypeOf((*MockIConfigClient)(nil).GetConfigContent), dataId, groupId) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PublishConfig", reflect.TypeOf((*MockIConfigClient)(nil).PublishConfig), param)
}
// SearchConfig mocks base method.
func (m *MockIConfigClient) SearchConfig(param vo.SearchConfigParam) (*model.ConfigPage, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SearchConfig", param)
ret0, _ := ret[0].(*model.ConfigPage)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SearchConfig indicates an expected call of SearchConfig.
func (mr *MockIConfigClientMockRecorder) SearchConfig(param interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SearchConfig", reflect.TypeOf((*MockIConfigClient)(nil).SearchConfig), param)
} }

View File

@ -1,21 +1,5 @@
/*
* Copyright 1999-2020 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Code generated by MockGen. DO NOT EDIT. // Code generated by MockGen. DO NOT EDIT.
// Source: common/http_agent/http_agent_interface.go // Source: ./http_agent_interface.go
// Package mock is a generated GoMock package. // Package mock is a generated GoMock package.
package mock package mock
@ -27,60 +11,30 @@ import (
gomock "github.com/golang/mock/gomock" gomock "github.com/golang/mock/gomock"
) )
// MockIHttpAgent is a mock of IHttpAgent interface // MockIHttpAgent is a mock of IHttpAgent interface.
type MockIHttpAgent struct { type MockIHttpAgent struct {
ctrl *gomock.Controller ctrl *gomock.Controller
recorder *MockIHttpAgentMockRecorder recorder *MockIHttpAgentMockRecorder
} }
// MockIHttpAgentMockRecorder is the mock recorder for MockIHttpAgent // MockIHttpAgentMockRecorder is the mock recorder for MockIHttpAgent.
type MockIHttpAgentMockRecorder struct { type MockIHttpAgentMockRecorder struct {
mock *MockIHttpAgent mock *MockIHttpAgent
} }
// NewMockIHttpAgent creates a new mock instance // NewMockIHttpAgent creates a new mock instance.
func NewMockIHttpAgent(ctrl *gomock.Controller) *MockIHttpAgent { func NewMockIHttpAgent(ctrl *gomock.Controller) *MockIHttpAgent {
mock := &MockIHttpAgent{ctrl: ctrl} mock := &MockIHttpAgent{ctrl: ctrl}
mock.recorder = &MockIHttpAgentMockRecorder{mock} mock.recorder = &MockIHttpAgentMockRecorder{mock}
return mock return mock
} }
// EXPECT returns an object that allows the caller to indicate expected use // EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockIHttpAgent) EXPECT() *MockIHttpAgentMockRecorder { func (m *MockIHttpAgent) EXPECT() *MockIHttpAgentMockRecorder {
return m.recorder return m.recorder
} }
// Get mocks base method // Delete mocks base method.
func (m *MockIHttpAgent) Get(path string, header http.Header, timeoutMs uint64, params map[string]string) (*http.Response, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get", path, header, timeoutMs, params)
ret0, _ := ret[0].(*http.Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Get indicates an expected call of Get
func (mr *MockIHttpAgentMockRecorder) Get(path, header, timeoutMs, params interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockIHttpAgent)(nil).Get), path, header, timeoutMs, params)
}
// Post mocks base method
func (m *MockIHttpAgent) Post(path string, header http.Header, timeoutMs uint64, params map[string]string) (*http.Response, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Post", path, header, timeoutMs, params)
ret0, _ := ret[0].(*http.Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Post indicates an expected call of Post
func (mr *MockIHttpAgentMockRecorder) Post(path, header, timeoutMs, params interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Post", reflect.TypeOf((*MockIHttpAgent)(nil).Post), path, header, timeoutMs, params)
}
// Delete mocks base method
func (m *MockIHttpAgent) Delete(path string, header http.Header, timeoutMs uint64, params map[string]string) (*http.Response, error) { func (m *MockIHttpAgent) Delete(path string, header http.Header, timeoutMs uint64, params map[string]string) (*http.Response, error) {
m.ctrl.T.Helper() m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Delete", path, header, timeoutMs, params) ret := m.ctrl.Call(m, "Delete", path, header, timeoutMs, params)
@ -89,13 +43,43 @@ func (m *MockIHttpAgent) Delete(path string, header http.Header, timeoutMs uint6
return ret0, ret1 return ret0, ret1
} }
// Delete indicates an expected call of Delete // Delete indicates an expected call of Delete.
func (mr *MockIHttpAgentMockRecorder) Delete(path, header, timeoutMs, params interface{}) *gomock.Call { func (mr *MockIHttpAgentMockRecorder) Delete(path, header, timeoutMs, params interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper() mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockIHttpAgent)(nil).Delete), path, header, timeoutMs, params) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockIHttpAgent)(nil).Delete), path, header, timeoutMs, params)
} }
// Put mocks base method // Get mocks base method.
func (m *MockIHttpAgent) Get(path string, header http.Header, timeoutMs uint64, params map[string]string) (*http.Response, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get", path, header, timeoutMs, params)
ret0, _ := ret[0].(*http.Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Get indicates an expected call of Get.
func (mr *MockIHttpAgentMockRecorder) Get(path, header, timeoutMs, params interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockIHttpAgent)(nil).Get), path, header, timeoutMs, params)
}
// Post mocks base method.
func (m *MockIHttpAgent) Post(path string, header http.Header, timeoutMs uint64, params map[string]string) (*http.Response, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Post", path, header, timeoutMs, params)
ret0, _ := ret[0].(*http.Response)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Post indicates an expected call of Post.
func (mr *MockIHttpAgentMockRecorder) Post(path, header, timeoutMs, params interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Post", reflect.TypeOf((*MockIHttpAgent)(nil).Post), path, header, timeoutMs, params)
}
// Put mocks base method.
func (m *MockIHttpAgent) Put(path string, header http.Header, timeoutMs uint64, params map[string]string) (*http.Response, error) { func (m *MockIHttpAgent) Put(path string, header http.Header, timeoutMs uint64, params map[string]string) (*http.Response, error) {
m.ctrl.T.Helper() m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Put", path, header, timeoutMs, params) ret := m.ctrl.Call(m, "Put", path, header, timeoutMs, params)
@ -104,27 +88,13 @@ func (m *MockIHttpAgent) Put(path string, header http.Header, timeoutMs uint64,
return ret0, ret1 return ret0, ret1
} }
// Put indicates an expected call of Put // Put indicates an expected call of Put.
func (mr *MockIHttpAgentMockRecorder) Put(path, header, timeoutMs, params interface{}) *gomock.Call { func (mr *MockIHttpAgentMockRecorder) Put(path, header, timeoutMs, params interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper() mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockIHttpAgent)(nil).Put), path, header, timeoutMs, params) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockIHttpAgent)(nil).Put), path, header, timeoutMs, params)
} }
// RequestOnlyResult mocks base method // Request mocks base method.
func (m *MockIHttpAgent) RequestOnlyResult(method, path string, header http.Header, timeoutMs uint64, params map[string]string) string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RequestOnlyResult", method, path, header, timeoutMs, params)
ret0, _ := ret[0].(string)
return ret0
}
// RequestOnlyResult indicates an expected call of RequestOnlyResult
func (mr *MockIHttpAgentMockRecorder) RequestOnlyResult(method, path, header, timeoutMs, params interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequestOnlyResult", reflect.TypeOf((*MockIHttpAgent)(nil).RequestOnlyResult), method, path, header, timeoutMs, params)
}
// Request mocks base method
func (m *MockIHttpAgent) Request(method, path string, header http.Header, timeoutMs uint64, params map[string]string) (*http.Response, error) { func (m *MockIHttpAgent) Request(method, path string, header http.Header, timeoutMs uint64, params map[string]string) (*http.Response, error) {
m.ctrl.T.Helper() m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Request", method, path, header, timeoutMs, params) ret := m.ctrl.Call(m, "Request", method, path, header, timeoutMs, params)
@ -133,8 +103,22 @@ func (m *MockIHttpAgent) Request(method, path string, header http.Header, timeou
return ret0, ret1 return ret0, ret1
} }
// Request indicates an expected call of Request // Request indicates an expected call of Request.
func (mr *MockIHttpAgentMockRecorder) Request(method, path, header, timeoutMs, params interface{}) *gomock.Call { func (mr *MockIHttpAgentMockRecorder) Request(method, path, header, timeoutMs, params interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper() mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Request", reflect.TypeOf((*MockIHttpAgent)(nil).Request), method, path, header, timeoutMs, params) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Request", reflect.TypeOf((*MockIHttpAgent)(nil).Request), method, path, header, timeoutMs, params)
} }
// RequestOnlyResult mocks base method.
func (m *MockIHttpAgent) RequestOnlyResult(method, path string, header http.Header, timeoutMs uint64, params map[string]string) string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RequestOnlyResult", method, path, header, timeoutMs, params)
ret0, _ := ret[0].(string)
return ret0
}
// RequestOnlyResult indicates an expected call of RequestOnlyResult.
func (mr *MockIHttpAgentMockRecorder) RequestOnlyResult(method, path, header, timeoutMs, params interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RequestOnlyResult", reflect.TypeOf((*MockIHttpAgent)(nil).RequestOnlyResult), method, path, header, timeoutMs, params)
}

View File

@ -1,21 +1,5 @@
/*
* Copyright 1999-2020 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Code generated by MockGen. DO NOT EDIT. // Code generated by MockGen. DO NOT EDIT.
// Source: clients/nacos_client/nacos_client_interface.go // Source: ./nacos_client_interface.go
// Package mock is a generated GoMock package. // Package mock is a generated GoMock package.
package mock package mock
@ -23,64 +7,35 @@ package mock
import ( import (
reflect "reflect" reflect "reflect"
"github.com/nacos-group/nacos-sdk-go/v2/common/constant"
"github.com/nacos-group/nacos-sdk-go/v2/common/http_agent"
gomock "github.com/golang/mock/gomock" gomock "github.com/golang/mock/gomock"
constant "github.com/nacos-group/nacos-sdk-go/v2/common/constant"
http_agent "github.com/nacos-group/nacos-sdk-go/v2/common/http_agent"
) )
// MockINacosClient is a mock of INacosClient interface // MockINacosClient is a mock of INacosClient interface.
type MockINacosClient struct { type MockINacosClient struct {
ctrl *gomock.Controller ctrl *gomock.Controller
recorder *MockINacosClientMockRecorder recorder *MockINacosClientMockRecorder
} }
// MockINacosClientMockRecorder is the mock recorder for MockINacosClient // MockINacosClientMockRecorder is the mock recorder for MockINacosClient.
type MockINacosClientMockRecorder struct { type MockINacosClientMockRecorder struct {
mock *MockINacosClient mock *MockINacosClient
} }
// NewMockINacosClient creates a new mock instance // NewMockINacosClient creates a new mock instance.
func NewMockINacosClient(ctrl *gomock.Controller) *MockINacosClient { func NewMockINacosClient(ctrl *gomock.Controller) *MockINacosClient {
mock := &MockINacosClient{ctrl: ctrl} mock := &MockINacosClient{ctrl: ctrl}
mock.recorder = &MockINacosClientMockRecorder{mock} mock.recorder = &MockINacosClientMockRecorder{mock}
return mock return mock
} }
// EXPECT returns an object that allows the caller to indicate expected use // EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockINacosClient) EXPECT() *MockINacosClientMockRecorder { func (m *MockINacosClient) EXPECT() *MockINacosClientMockRecorder {
return m.recorder return m.recorder
} }
// SetClientConfig mocks base method // GetClientConfig mocks base method.
func (m *MockINacosClient) SetClientConfig(arg0 constant.ClientConfig) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetClientConfig", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SetClientConfig indicates an expected call of SetClientConfig
func (mr *MockINacosClientMockRecorder) SetClientConfig(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetClientConfig", reflect.TypeOf((*MockINacosClient)(nil).SetClientConfig), arg0)
}
// SetServerConfig mocks base method
func (m *MockINacosClient) SetServerConfig(arg0 []constant.ServerConfig) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetServerConfig", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SetServerConfig indicates an expected call of SetServerConfig
func (mr *MockINacosClientMockRecorder) SetServerConfig(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetServerConfig", reflect.TypeOf((*MockINacosClient)(nil).SetServerConfig), arg0)
}
// GetClientConfig mocks base method
func (m *MockINacosClient) GetClientConfig() (constant.ClientConfig, error) { func (m *MockINacosClient) GetClientConfig() (constant.ClientConfig, error) {
m.ctrl.T.Helper() m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetClientConfig") ret := m.ctrl.Call(m, "GetClientConfig")
@ -89,42 +44,13 @@ func (m *MockINacosClient) GetClientConfig() (constant.ClientConfig, error) {
return ret0, ret1 return ret0, ret1
} }
// GetClientConfig indicates an expected call of GetClientConfig // GetClientConfig indicates an expected call of GetClientConfig.
func (mr *MockINacosClientMockRecorder) GetClientConfig() *gomock.Call { func (mr *MockINacosClientMockRecorder) GetClientConfig() *gomock.Call {
mr.mock.ctrl.T.Helper() mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClientConfig", reflect.TypeOf((*MockINacosClient)(nil).GetClientConfig)) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClientConfig", reflect.TypeOf((*MockINacosClient)(nil).GetClientConfig))
} }
// GetServerConfig mocks base method // GetHttpAgent mocks base method.
func (m *MockINacosClient) GetServerConfig() ([]constant.ServerConfig, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetServerConfig")
ret0, _ := ret[0].([]constant.ServerConfig)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetServerConfig indicates an expected call of GetServerConfig
func (mr *MockINacosClientMockRecorder) GetServerConfig() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServerConfig", reflect.TypeOf((*MockINacosClient)(nil).GetServerConfig))
}
// SetHttpAgent mocks base method
func (m *MockINacosClient) SetHttpAgent(arg0 http_agent.IHttpAgent) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetHttpAgent", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SetHttpAgent indicates an expected call of SetHttpAgent
func (mr *MockINacosClientMockRecorder) SetHttpAgent(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHttpAgent", reflect.TypeOf((*MockINacosClient)(nil).SetHttpAgent), arg0)
}
// GetHttpAgent mocks base method
func (m *MockINacosClient) GetHttpAgent() (http_agent.IHttpAgent, error) { func (m *MockINacosClient) GetHttpAgent() (http_agent.IHttpAgent, error) {
m.ctrl.T.Helper() m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetHttpAgent") ret := m.ctrl.Call(m, "GetHttpAgent")
@ -133,8 +59,65 @@ func (m *MockINacosClient) GetHttpAgent() (http_agent.IHttpAgent, error) {
return ret0, ret1 return ret0, ret1
} }
// GetHttpAgent indicates an expected call of GetHttpAgent // GetHttpAgent indicates an expected call of GetHttpAgent.
func (mr *MockINacosClientMockRecorder) GetHttpAgent() *gomock.Call { func (mr *MockINacosClientMockRecorder) GetHttpAgent() *gomock.Call {
mr.mock.ctrl.T.Helper() mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHttpAgent", reflect.TypeOf((*MockINacosClient)(nil).GetHttpAgent)) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHttpAgent", reflect.TypeOf((*MockINacosClient)(nil).GetHttpAgent))
} }
// GetServerConfig mocks base method.
func (m *MockINacosClient) GetServerConfig() ([]constant.ServerConfig, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetServerConfig")
ret0, _ := ret[0].([]constant.ServerConfig)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetServerConfig indicates an expected call of GetServerConfig.
func (mr *MockINacosClientMockRecorder) GetServerConfig() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServerConfig", reflect.TypeOf((*MockINacosClient)(nil).GetServerConfig))
}
// SetClientConfig mocks base method.
func (m *MockINacosClient) SetClientConfig(arg0 constant.ClientConfig) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetClientConfig", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SetClientConfig indicates an expected call of SetClientConfig.
func (mr *MockINacosClientMockRecorder) SetClientConfig(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetClientConfig", reflect.TypeOf((*MockINacosClient)(nil).SetClientConfig), arg0)
}
// SetHttpAgent mocks base method.
func (m *MockINacosClient) SetHttpAgent(arg0 http_agent.IHttpAgent) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetHttpAgent", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SetHttpAgent indicates an expected call of SetHttpAgent.
func (mr *MockINacosClientMockRecorder) SetHttpAgent(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHttpAgent", reflect.TypeOf((*MockINacosClient)(nil).SetHttpAgent), arg0)
}
// SetServerConfig mocks base method.
func (m *MockINacosClient) SetServerConfig(arg0 []constant.ServerConfig) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetServerConfig", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SetServerConfig indicates an expected call of SetServerConfig.
func (mr *MockINacosClientMockRecorder) SetServerConfig(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetServerConfig", reflect.TypeOf((*MockINacosClient)(nil).SetServerConfig), arg0)
}

View File

@ -1,21 +1,5 @@
/*
* Copyright 1999-2020 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Code generated by MockGen. DO NOT EDIT. // Code generated by MockGen. DO NOT EDIT.
// Source: clients/naming_client/naming_client_interface.go // Source: ./naming_client_interface.go
// Package mock is a generated GoMock package. // Package mock is a generated GoMock package.
package mock package mock
@ -28,45 +12,57 @@ import (
vo "github.com/nacos-group/nacos-sdk-go/v2/vo" vo "github.com/nacos-group/nacos-sdk-go/v2/vo"
) )
// MockINamingClient is a mock of INamingClient interface // MockINamingClient is a mock of INamingClient interface.
type MockINamingClient struct { type MockINamingClient struct {
ctrl *gomock.Controller ctrl *gomock.Controller
recorder *MockINamingClientMockRecorder recorder *MockINamingClientMockRecorder
} }
// MockINamingClientMockRecorder is the mock recorder for MockINamingClient // MockINamingClientMockRecorder is the mock recorder for MockINamingClient.
type MockINamingClientMockRecorder struct { type MockINamingClientMockRecorder struct {
mock *MockINamingClient mock *MockINamingClient
} }
// NewMockINamingClient creates a new mock instance // NewMockINamingClient creates a new mock instance.
func NewMockINamingClient(ctrl *gomock.Controller) *MockINamingClient { func NewMockINamingClient(ctrl *gomock.Controller) *MockINamingClient {
mock := &MockINamingClient{ctrl: ctrl} mock := &MockINamingClient{ctrl: ctrl}
mock.recorder = &MockINamingClientMockRecorder{mock} mock.recorder = &MockINamingClientMockRecorder{mock}
return mock return mock
} }
// EXPECT returns an object that allows the caller to indicate expected use // EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockINamingClient) EXPECT() *MockINamingClientMockRecorder { func (m *MockINamingClient) EXPECT() *MockINamingClientMockRecorder {
return m.recorder return m.recorder
} }
// RegisterInstance mocks base method // BatchRegisterInstance mocks base method.
func (m *MockINamingClient) RegisterInstance(param vo.RegisterInstanceParam) (bool, error) { func (m *MockINamingClient) BatchRegisterInstance(param vo.BatchRegisterInstanceParam) (bool, error) {
m.ctrl.T.Helper() m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RegisterInstance", param) ret := m.ctrl.Call(m, "BatchRegisterInstance", param)
ret0, _ := ret[0].(bool) ret0, _ := ret[0].(bool)
ret1, _ := ret[1].(error) ret1, _ := ret[1].(error)
return ret0, ret1 return ret0, ret1
} }
// RegisterInstance indicates an expected call of RegisterInstance // BatchRegisterInstance indicates an expected call of BatchRegisterInstance.
func (mr *MockINamingClientMockRecorder) RegisterInstance(param interface{}) *gomock.Call { func (mr *MockINamingClientMockRecorder) BatchRegisterInstance(param interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper() mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterInstance", reflect.TypeOf((*MockINamingClient)(nil).RegisterInstance), param) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BatchRegisterInstance", reflect.TypeOf((*MockINamingClient)(nil).BatchRegisterInstance), param)
} }
// DeregisterInstance mocks base method // CloseClient mocks base method.
func (m *MockINamingClient) CloseClient() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "CloseClient")
}
// CloseClient indicates an expected call of CloseClient.
func (mr *MockINamingClientMockRecorder) CloseClient() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseClient", reflect.TypeOf((*MockINamingClient)(nil).CloseClient))
}
// DeregisterInstance mocks base method.
func (m *MockINamingClient) DeregisterInstance(param vo.DeregisterInstanceParam) (bool, error) { func (m *MockINamingClient) DeregisterInstance(param vo.DeregisterInstanceParam) (bool, error) {
m.ctrl.T.Helper() m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeregisterInstance", param) ret := m.ctrl.Call(m, "DeregisterInstance", param)
@ -75,13 +71,28 @@ func (m *MockINamingClient) DeregisterInstance(param vo.DeregisterInstanceParam)
return ret0, ret1 return ret0, ret1
} }
// DeregisterInstance indicates an expected call of DeregisterInstance // DeregisterInstance indicates an expected call of DeregisterInstance.
func (mr *MockINamingClientMockRecorder) DeregisterInstance(param interface{}) *gomock.Call { func (mr *MockINamingClientMockRecorder) DeregisterInstance(param interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper() mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeregisterInstance", reflect.TypeOf((*MockINamingClient)(nil).DeregisterInstance), param) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeregisterInstance", reflect.TypeOf((*MockINamingClient)(nil).DeregisterInstance), param)
} }
// GetService mocks base method // GetAllServicesInfo mocks base method.
func (m *MockINamingClient) GetAllServicesInfo(param vo.GetAllServiceInfoParam) (model.ServiceList, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetAllServicesInfo", param)
ret0, _ := ret[0].(model.ServiceList)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetAllServicesInfo indicates an expected call of GetAllServicesInfo.
func (mr *MockINamingClientMockRecorder) GetAllServicesInfo(param interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllServicesInfo", reflect.TypeOf((*MockINamingClient)(nil).GetAllServicesInfo), param)
}
// GetService mocks base method.
func (m *MockINamingClient) GetService(param vo.GetServiceParam) (model.Service, error) { func (m *MockINamingClient) GetService(param vo.GetServiceParam) (model.Service, error) {
m.ctrl.T.Helper() m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetService", param) ret := m.ctrl.Call(m, "GetService", param)
@ -90,13 +101,43 @@ func (m *MockINamingClient) GetService(param vo.GetServiceParam) (model.Service,
return ret0, ret1 return ret0, ret1
} }
// GetService indicates an expected call of GetService // GetService indicates an expected call of GetService.
func (mr *MockINamingClientMockRecorder) GetService(param interface{}) *gomock.Call { func (mr *MockINamingClientMockRecorder) GetService(param interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper() mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetService", reflect.TypeOf((*MockINamingClient)(nil).GetService), param) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetService", reflect.TypeOf((*MockINamingClient)(nil).GetService), param)
} }
// SelectInstances mocks base method // RegisterInstance mocks base method.
func (m *MockINamingClient) RegisterInstance(param vo.RegisterInstanceParam) (bool, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RegisterInstance", param)
ret0, _ := ret[0].(bool)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// RegisterInstance indicates an expected call of RegisterInstance.
func (mr *MockINamingClientMockRecorder) RegisterInstance(param interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterInstance", reflect.TypeOf((*MockINamingClient)(nil).RegisterInstance), param)
}
// SelectAllInstances mocks base method.
func (m *MockINamingClient) SelectAllInstances(param vo.SelectAllInstancesParam) ([]model.Instance, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SelectAllInstances", param)
ret0, _ := ret[0].([]model.Instance)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SelectAllInstances indicates an expected call of SelectAllInstances.
func (mr *MockINamingClientMockRecorder) SelectAllInstances(param interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectAllInstances", reflect.TypeOf((*MockINamingClient)(nil).SelectAllInstances), param)
}
// SelectInstances mocks base method.
func (m *MockINamingClient) SelectInstances(param vo.SelectInstancesParam) ([]model.Instance, error) { func (m *MockINamingClient) SelectInstances(param vo.SelectInstancesParam) ([]model.Instance, error) {
m.ctrl.T.Helper() m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SelectInstances", param) ret := m.ctrl.Call(m, "SelectInstances", param)
@ -105,13 +146,13 @@ func (m *MockINamingClient) SelectInstances(param vo.SelectInstancesParam) ([]mo
return ret0, ret1 return ret0, ret1
} }
// SelectInstances indicates an expected call of SelectInstances // SelectInstances indicates an expected call of SelectInstances.
func (mr *MockINamingClientMockRecorder) SelectInstances(param interface{}) *gomock.Call { func (mr *MockINamingClientMockRecorder) SelectInstances(param interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper() mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectInstances", reflect.TypeOf((*MockINamingClient)(nil).SelectInstances), param) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectInstances", reflect.TypeOf((*MockINamingClient)(nil).SelectInstances), param)
} }
// SelectOneHealthyInstance mocks base method // SelectOneHealthyInstance mocks base method.
func (m *MockINamingClient) SelectOneHealthyInstance(param vo.SelectOneHealthInstanceParam) (*model.Instance, error) { func (m *MockINamingClient) SelectOneHealthyInstance(param vo.SelectOneHealthInstanceParam) (*model.Instance, error) {
m.ctrl.T.Helper() m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SelectOneHealthyInstance", param) ret := m.ctrl.Call(m, "SelectOneHealthyInstance", param)
@ -120,13 +161,27 @@ func (m *MockINamingClient) SelectOneHealthyInstance(param vo.SelectOneHealthIns
return ret0, ret1 return ret0, ret1
} }
// SelectOneHealthyInstance indicates an expected call of SelectOneHealthyInstance // SelectOneHealthyInstance indicates an expected call of SelectOneHealthyInstance.
func (mr *MockINamingClientMockRecorder) SelectOneHealthyInstance(param interface{}) *gomock.Call { func (mr *MockINamingClientMockRecorder) SelectOneHealthyInstance(param interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper() mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectOneHealthyInstance", reflect.TypeOf((*MockINamingClient)(nil).SelectOneHealthyInstance), param) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectOneHealthyInstance", reflect.TypeOf((*MockINamingClient)(nil).SelectOneHealthyInstance), param)
} }
// Subscribe mocks base method // ServerHealthy mocks base method.
func (m *MockINamingClient) ServerHealthy() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ServerHealthy")
ret0, _ := ret[0].(bool)
return ret0
}
// ServerHealthy indicates an expected call of ServerHealthy.
func (mr *MockINamingClientMockRecorder) ServerHealthy() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerHealthy", reflect.TypeOf((*MockINamingClient)(nil).ServerHealthy))
}
// Subscribe mocks base method.
func (m *MockINamingClient) Subscribe(param *vo.SubscribeParam) error { func (m *MockINamingClient) Subscribe(param *vo.SubscribeParam) error {
m.ctrl.T.Helper() m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Subscribe", param) ret := m.ctrl.Call(m, "Subscribe", param)
@ -134,13 +189,13 @@ func (m *MockINamingClient) Subscribe(param *vo.SubscribeParam) error {
return ret0 return ret0
} }
// Subscribe indicates an expected call of Subscribe // Subscribe indicates an expected call of Subscribe.
func (mr *MockINamingClientMockRecorder) Subscribe(param interface{}) *gomock.Call { func (mr *MockINamingClientMockRecorder) Subscribe(param interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper() mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subscribe", reflect.TypeOf((*MockINamingClient)(nil).Subscribe), param) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subscribe", reflect.TypeOf((*MockINamingClient)(nil).Subscribe), param)
} }
// Unsubscribe mocks base method // Unsubscribe mocks base method.
func (m *MockINamingClient) Unsubscribe(param *vo.SubscribeParam) error { func (m *MockINamingClient) Unsubscribe(param *vo.SubscribeParam) error {
m.ctrl.T.Helper() m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Unsubscribe", param) ret := m.ctrl.Call(m, "Unsubscribe", param)
@ -148,8 +203,23 @@ func (m *MockINamingClient) Unsubscribe(param *vo.SubscribeParam) error {
return ret0 return ret0
} }
// Unsubscribe indicates an expected call of Unsubscribe // Unsubscribe indicates an expected call of Unsubscribe.
func (mr *MockINamingClientMockRecorder) Unsubscribe(param interface{}) *gomock.Call { func (mr *MockINamingClientMockRecorder) Unsubscribe(param interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper() mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unsubscribe", reflect.TypeOf((*MockINamingClient)(nil).Unsubscribe), param) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unsubscribe", reflect.TypeOf((*MockINamingClient)(nil).Unsubscribe), param)
} }
// UpdateInstance mocks base method.
func (m *MockINamingClient) UpdateInstance(param vo.UpdateInstanceParam) (bool, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "UpdateInstance", param)
ret0, _ := ret[0].(bool)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpdateInstance indicates an expected call of UpdateInstance.
func (mr *MockINamingClientMockRecorder) UpdateInstance(param interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateInstance", reflect.TypeOf((*MockINamingClient)(nil).UpdateInstance), param)
}