mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 17:18:35 +08:00
This PR implements a new CDC service for Milvus 2.6, providing log-based cross-cluster replication. issue: https://github.com/milvus-io/milvus/issues/44123 --------- Signed-off-by: bigsheeper <yihao.dai@zilliz.com> Signed-off-by: chyezh <chyezh@outlook.com> Co-authored-by: chyezh <chyezh@outlook.com>
98 lines
3.0 KiB
Go
98 lines
3.0 KiB
Go
// Code generated by mockery v2.53.3. DO NOT EDIT.
|
|
|
|
package cluster
|
|
|
|
import (
|
|
context "context"
|
|
|
|
commonpb "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
|
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// MockClusterClient is an autogenerated mock type for the ClusterClient type
|
|
type MockClusterClient struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type MockClusterClient_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *MockClusterClient) EXPECT() *MockClusterClient_Expecter {
|
|
return &MockClusterClient_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// CreateMilvusClient provides a mock function with given fields: ctx, _a1
|
|
func (_m *MockClusterClient) CreateMilvusClient(ctx context.Context, _a1 *commonpb.MilvusCluster) (MilvusClient, error) {
|
|
ret := _m.Called(ctx, _a1)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for CreateMilvusClient")
|
|
}
|
|
|
|
var r0 MilvusClient
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *commonpb.MilvusCluster) (MilvusClient, error)); ok {
|
|
return rf(ctx, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *commonpb.MilvusCluster) MilvusClient); ok {
|
|
r0 = rf(ctx, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(MilvusClient)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *commonpb.MilvusCluster) error); ok {
|
|
r1 = rf(ctx, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockClusterClient_CreateMilvusClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateMilvusClient'
|
|
type MockClusterClient_CreateMilvusClient_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// CreateMilvusClient is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - _a1 *commonpb.MilvusCluster
|
|
func (_e *MockClusterClient_Expecter) CreateMilvusClient(ctx interface{}, _a1 interface{}) *MockClusterClient_CreateMilvusClient_Call {
|
|
return &MockClusterClient_CreateMilvusClient_Call{Call: _e.mock.On("CreateMilvusClient", ctx, _a1)}
|
|
}
|
|
|
|
func (_c *MockClusterClient_CreateMilvusClient_Call) Run(run func(ctx context.Context, _a1 *commonpb.MilvusCluster)) *MockClusterClient_CreateMilvusClient_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*commonpb.MilvusCluster))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClusterClient_CreateMilvusClient_Call) Return(_a0 MilvusClient, _a1 error) *MockClusterClient_CreateMilvusClient_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockClusterClient_CreateMilvusClient_Call) RunAndReturn(run func(context.Context, *commonpb.MilvusCluster) (MilvusClient, error)) *MockClusterClient_CreateMilvusClient_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// NewMockClusterClient creates a new instance of MockClusterClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
// The first argument is typically a *testing.T value.
|
|
func NewMockClusterClient(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *MockClusterClient {
|
|
mock := &MockClusterClient{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|