// Code generated by mockery v2.46.0. DO NOT EDIT. package mock_handler import ( context "context" consumer "github.com/milvus-io/milvus/internal/streamingnode/client/handler/consumer" handler "github.com/milvus-io/milvus/internal/streamingnode/client/handler" mock "github.com/stretchr/testify/mock" producer "github.com/milvus-io/milvus/internal/streamingnode/client/handler/producer" ) // MockHandlerClient is an autogenerated mock type for the HandlerClient type type MockHandlerClient struct { mock.Mock } type MockHandlerClient_Expecter struct { mock *mock.Mock } func (_m *MockHandlerClient) EXPECT() *MockHandlerClient_Expecter { return &MockHandlerClient_Expecter{mock: &_m.Mock} } // Close provides a mock function with given fields: func (_m *MockHandlerClient) Close() { _m.Called() } // MockHandlerClient_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' type MockHandlerClient_Close_Call struct { *mock.Call } // Close is a helper method to define mock.On call func (_e *MockHandlerClient_Expecter) Close() *MockHandlerClient_Close_Call { return &MockHandlerClient_Close_Call{Call: _e.mock.On("Close")} } func (_c *MockHandlerClient_Close_Call) Run(run func()) *MockHandlerClient_Close_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockHandlerClient_Close_Call) Return() *MockHandlerClient_Close_Call { _c.Call.Return() return _c } func (_c *MockHandlerClient_Close_Call) RunAndReturn(run func()) *MockHandlerClient_Close_Call { _c.Call.Return(run) return _c } // CreateConsumer provides a mock function with given fields: ctx, opts func (_m *MockHandlerClient) CreateConsumer(ctx context.Context, opts *handler.ConsumerOptions) (consumer.Consumer, error) { ret := _m.Called(ctx, opts) if len(ret) == 0 { panic("no return value specified for CreateConsumer") } var r0 consumer.Consumer var r1 error if rf, ok := ret.Get(0).(func(context.Context, *handler.ConsumerOptions) (consumer.Consumer, error)); ok { return rf(ctx, opts) } if rf, ok := ret.Get(0).(func(context.Context, *handler.ConsumerOptions) consumer.Consumer); ok { r0 = rf(ctx, opts) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(consumer.Consumer) } } if rf, ok := ret.Get(1).(func(context.Context, *handler.ConsumerOptions) error); ok { r1 = rf(ctx, opts) } else { r1 = ret.Error(1) } return r0, r1 } // MockHandlerClient_CreateConsumer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateConsumer' type MockHandlerClient_CreateConsumer_Call struct { *mock.Call } // CreateConsumer is a helper method to define mock.On call // - ctx context.Context // - opts *handler.ConsumerOptions func (_e *MockHandlerClient_Expecter) CreateConsumer(ctx interface{}, opts interface{}) *MockHandlerClient_CreateConsumer_Call { return &MockHandlerClient_CreateConsumer_Call{Call: _e.mock.On("CreateConsumer", ctx, opts)} } func (_c *MockHandlerClient_CreateConsumer_Call) Run(run func(ctx context.Context, opts *handler.ConsumerOptions)) *MockHandlerClient_CreateConsumer_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*handler.ConsumerOptions)) }) return _c } func (_c *MockHandlerClient_CreateConsumer_Call) Return(_a0 consumer.Consumer, _a1 error) *MockHandlerClient_CreateConsumer_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *MockHandlerClient_CreateConsumer_Call) RunAndReturn(run func(context.Context, *handler.ConsumerOptions) (consumer.Consumer, error)) *MockHandlerClient_CreateConsumer_Call { _c.Call.Return(run) return _c } // CreateProducer provides a mock function with given fields: ctx, opts func (_m *MockHandlerClient) CreateProducer(ctx context.Context, opts *handler.ProducerOptions) (producer.Producer, error) { ret := _m.Called(ctx, opts) if len(ret) == 0 { panic("no return value specified for CreateProducer") } var r0 producer.Producer var r1 error if rf, ok := ret.Get(0).(func(context.Context, *handler.ProducerOptions) (producer.Producer, error)); ok { return rf(ctx, opts) } if rf, ok := ret.Get(0).(func(context.Context, *handler.ProducerOptions) producer.Producer); ok { r0 = rf(ctx, opts) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(producer.Producer) } } if rf, ok := ret.Get(1).(func(context.Context, *handler.ProducerOptions) error); ok { r1 = rf(ctx, opts) } else { r1 = ret.Error(1) } return r0, r1 } // MockHandlerClient_CreateProducer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateProducer' type MockHandlerClient_CreateProducer_Call struct { *mock.Call } // CreateProducer is a helper method to define mock.On call // - ctx context.Context // - opts *handler.ProducerOptions func (_e *MockHandlerClient_Expecter) CreateProducer(ctx interface{}, opts interface{}) *MockHandlerClient_CreateProducer_Call { return &MockHandlerClient_CreateProducer_Call{Call: _e.mock.On("CreateProducer", ctx, opts)} } func (_c *MockHandlerClient_CreateProducer_Call) Run(run func(ctx context.Context, opts *handler.ProducerOptions)) *MockHandlerClient_CreateProducer_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(*handler.ProducerOptions)) }) return _c } func (_c *MockHandlerClient_CreateProducer_Call) Return(_a0 producer.Producer, _a1 error) *MockHandlerClient_CreateProducer_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *MockHandlerClient_CreateProducer_Call) RunAndReturn(run func(context.Context, *handler.ProducerOptions) (producer.Producer, error)) *MockHandlerClient_CreateProducer_Call { _c.Call.Return(run) return _c } // GetLatestMVCCTimestampIfLocal provides a mock function with given fields: ctx, vchannel func (_m *MockHandlerClient) GetLatestMVCCTimestampIfLocal(ctx context.Context, vchannel string) (uint64, error) { ret := _m.Called(ctx, vchannel) if len(ret) == 0 { panic("no return value specified for GetLatestMVCCTimestampIfLocal") } var r0 uint64 var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (uint64, error)); ok { return rf(ctx, vchannel) } if rf, ok := ret.Get(0).(func(context.Context, string) uint64); ok { r0 = rf(ctx, vchannel) } else { r0 = ret.Get(0).(uint64) } if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, vchannel) } else { r1 = ret.Error(1) } return r0, r1 } // MockHandlerClient_GetLatestMVCCTimestampIfLocal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestMVCCTimestampIfLocal' type MockHandlerClient_GetLatestMVCCTimestampIfLocal_Call struct { *mock.Call } // GetLatestMVCCTimestampIfLocal is a helper method to define mock.On call // - ctx context.Context // - vchannel string func (_e *MockHandlerClient_Expecter) GetLatestMVCCTimestampIfLocal(ctx interface{}, vchannel interface{}) *MockHandlerClient_GetLatestMVCCTimestampIfLocal_Call { return &MockHandlerClient_GetLatestMVCCTimestampIfLocal_Call{Call: _e.mock.On("GetLatestMVCCTimestampIfLocal", ctx, vchannel)} } func (_c *MockHandlerClient_GetLatestMVCCTimestampIfLocal_Call) Run(run func(ctx context.Context, vchannel string)) *MockHandlerClient_GetLatestMVCCTimestampIfLocal_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(string)) }) return _c } func (_c *MockHandlerClient_GetLatestMVCCTimestampIfLocal_Call) Return(_a0 uint64, _a1 error) *MockHandlerClient_GetLatestMVCCTimestampIfLocal_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *MockHandlerClient_GetLatestMVCCTimestampIfLocal_Call) RunAndReturn(run func(context.Context, string) (uint64, error)) *MockHandlerClient_GetLatestMVCCTimestampIfLocal_Call { _c.Call.Return(run) return _c } // NewMockHandlerClient creates a new instance of MockHandlerClient. 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 NewMockHandlerClient(t interface { mock.TestingT Cleanup(func()) }) *MockHandlerClient { mock := &MockHandlerClient{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock }