Documentation ¶
Index ¶
- func HealthCheck(mqType string) *common.MQClusterStatus
- type DefaultFactory
- func (f *DefaultFactory) Init(params *paramtable.ComponentParam)
- func (f *DefaultFactory) NewMsgStream(ctx context.Context) (msgstream.MsgStream, error)
- func (f *DefaultFactory) NewMsgStreamDisposer(ctx context.Context) func([]string, string) error
- func (f *DefaultFactory) NewPersistentStorageChunkManager(ctx context.Context) (storage.ChunkManager, error)
- func (f *DefaultFactory) NewTtMsgStream(ctx context.Context) (msgstream.MsgStream, error)
- type Factory
- type MockFactory
- func (_m *MockFactory) EXPECT() *MockFactory_Expecter
- func (_m *MockFactory) Init(p *paramtable.ComponentParam)
- func (_m *MockFactory) NewMsgStream(ctx context.Context) (msgstream.MsgStream, error)
- func (_m *MockFactory) NewMsgStreamDisposer(ctx context.Context) func([]string, string) error
- func (_m *MockFactory) NewPersistentStorageChunkManager(ctx context.Context) (storage.ChunkManager, error)
- func (_m *MockFactory) NewTtMsgStream(ctx context.Context) (msgstream.MsgStream, error)
- type MockFactory_Expecter
- func (_e *MockFactory_Expecter) Init(p interface{}) *MockFactory_Init_Call
- func (_e *MockFactory_Expecter) NewMsgStream(ctx interface{}) *MockFactory_NewMsgStream_Call
- func (_e *MockFactory_Expecter) NewMsgStreamDisposer(ctx interface{}) *MockFactory_NewMsgStreamDisposer_Call
- func (_e *MockFactory_Expecter) NewPersistentStorageChunkManager(ctx interface{}) *MockFactory_NewPersistentStorageChunkManager_Call
- func (_e *MockFactory_Expecter) NewTtMsgStream(ctx interface{}) *MockFactory_NewTtMsgStream_Call
- type MockFactory_Init_Call
- type MockFactory_NewMsgStreamDisposer_Call
- func (_c *MockFactory_NewMsgStreamDisposer_Call) Return(_a0 func([]string, string) error) *MockFactory_NewMsgStreamDisposer_Call
- func (_c *MockFactory_NewMsgStreamDisposer_Call) Run(run func(ctx context.Context)) *MockFactory_NewMsgStreamDisposer_Call
- func (_c *MockFactory_NewMsgStreamDisposer_Call) RunAndReturn(run func(context.Context) func([]string, string) error) *MockFactory_NewMsgStreamDisposer_Call
- type MockFactory_NewMsgStream_Call
- func (_c *MockFactory_NewMsgStream_Call) Return(_a0 msgstream.MsgStream, _a1 error) *MockFactory_NewMsgStream_Call
- func (_c *MockFactory_NewMsgStream_Call) Run(run func(ctx context.Context)) *MockFactory_NewMsgStream_Call
- func (_c *MockFactory_NewMsgStream_Call) RunAndReturn(run func(context.Context) (msgstream.MsgStream, error)) *MockFactory_NewMsgStream_Call
- type MockFactory_NewPersistentStorageChunkManager_Call
- func (_c *MockFactory_NewPersistentStorageChunkManager_Call) Return(_a0 storage.ChunkManager, _a1 error) *MockFactory_NewPersistentStorageChunkManager_Call
- func (_c *MockFactory_NewPersistentStorageChunkManager_Call) Run(run func(ctx context.Context)) *MockFactory_NewPersistentStorageChunkManager_Call
- func (_c *MockFactory_NewPersistentStorageChunkManager_Call) RunAndReturn(run func(context.Context) (storage.ChunkManager, error)) *MockFactory_NewPersistentStorageChunkManager_Call
- type MockFactory_NewTtMsgStream_Call
- func (_c *MockFactory_NewTtMsgStream_Call) Return(_a0 msgstream.MsgStream, _a1 error) *MockFactory_NewTtMsgStream_Call
- func (_c *MockFactory_NewTtMsgStream_Call) Run(run func(ctx context.Context)) *MockFactory_NewTtMsgStream_Call
- func (_c *MockFactory_NewTtMsgStream_Call) RunAndReturn(run func(context.Context) (msgstream.MsgStream, error)) *MockFactory_NewTtMsgStream_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HealthCheck ¶
func HealthCheck(mqType string) *common.MQClusterStatus
Types ¶
type DefaultFactory ¶
type DefaultFactory struct {
// contains filtered or unexported fields
}
DefaultFactory is a factory that produces instances of storage.ChunkManager and message queue.
func MockDefaultFactory ¶
func MockDefaultFactory(standAlone bool, params *paramtable.ComponentParam) *DefaultFactory
Only for test
func NewFactory ¶
func NewFactory(standAlone bool) *DefaultFactory
NewFactory creates a new instance of the DefaultFactory type. If standAlone is true, the factory will operate in standalone mode.
func (*DefaultFactory) Init ¶
func (f *DefaultFactory) Init(params *paramtable.ComponentParam)
Init create a msg factory(TODO only support one mq at the same time.) In order to guarantee backward compatibility of config file, we still support multiple mq configs. The initialization of MQ follows the following rules, if the mq.type is default. 1. standalone(local) mode: rocksmq(default) > natsmq > Pulsar > Kafka 2. cluster mode: Pulsar(default) > Kafka (rocksmq and natsmq is unsupported in cluster mode)
func (*DefaultFactory) NewMsgStream ¶
func (*DefaultFactory) NewMsgStreamDisposer ¶
func (*DefaultFactory) NewPersistentStorageChunkManager ¶
func (f *DefaultFactory) NewPersistentStorageChunkManager(ctx context.Context) (storage.ChunkManager, error)
func (*DefaultFactory) NewTtMsgStream ¶
type Factory ¶
type Factory interface { msgstream.Factory Init(p *paramtable.ComponentParam) NewPersistentStorageChunkManager(ctx context.Context) (storage.ChunkManager, error) }
type MockFactory ¶
MockFactory is an autogenerated mock type for the Factory type
func NewMockFactory ¶
func NewMockFactory(t interface { mock.TestingT Cleanup(func()) }) *MockFactory
NewMockFactory creates a new instance of MockFactory. 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 (*MockFactory) EXPECT ¶
func (_m *MockFactory) EXPECT() *MockFactory_Expecter
func (*MockFactory) Init ¶
func (_m *MockFactory) Init(p *paramtable.ComponentParam)
Init provides a mock function with given fields: p
func (*MockFactory) NewMsgStream ¶
NewMsgStream provides a mock function with given fields: ctx
func (*MockFactory) NewMsgStreamDisposer ¶
NewMsgStreamDisposer provides a mock function with given fields: ctx
func (*MockFactory) NewPersistentStorageChunkManager ¶
func (_m *MockFactory) NewPersistentStorageChunkManager(ctx context.Context) (storage.ChunkManager, error)
NewPersistentStorageChunkManager provides a mock function with given fields: ctx
func (*MockFactory) NewTtMsgStream ¶
NewTtMsgStream provides a mock function with given fields: ctx
type MockFactory_Expecter ¶
type MockFactory_Expecter struct {
// contains filtered or unexported fields
}
func (*MockFactory_Expecter) Init ¶
func (_e *MockFactory_Expecter) Init(p interface{}) *MockFactory_Init_Call
Init is a helper method to define mock.On call
- p *paramtable.ComponentParam
func (*MockFactory_Expecter) NewMsgStream ¶
func (_e *MockFactory_Expecter) NewMsgStream(ctx interface{}) *MockFactory_NewMsgStream_Call
NewMsgStream is a helper method to define mock.On call
- ctx context.Context
func (*MockFactory_Expecter) NewMsgStreamDisposer ¶
func (_e *MockFactory_Expecter) NewMsgStreamDisposer(ctx interface{}) *MockFactory_NewMsgStreamDisposer_Call
NewMsgStreamDisposer is a helper method to define mock.On call
- ctx context.Context
func (*MockFactory_Expecter) NewPersistentStorageChunkManager ¶
func (_e *MockFactory_Expecter) NewPersistentStorageChunkManager(ctx interface{}) *MockFactory_NewPersistentStorageChunkManager_Call
NewPersistentStorageChunkManager is a helper method to define mock.On call
- ctx context.Context
func (*MockFactory_Expecter) NewTtMsgStream ¶
func (_e *MockFactory_Expecter) NewTtMsgStream(ctx interface{}) *MockFactory_NewTtMsgStream_Call
NewTtMsgStream is a helper method to define mock.On call
- ctx context.Context
type MockFactory_Init_Call ¶
MockFactory_Init_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Init'
func (*MockFactory_Init_Call) Return ¶
func (_c *MockFactory_Init_Call) Return() *MockFactory_Init_Call
func (*MockFactory_Init_Call) Run ¶
func (_c *MockFactory_Init_Call) Run(run func(p *paramtable.ComponentParam)) *MockFactory_Init_Call
func (*MockFactory_Init_Call) RunAndReturn ¶
func (_c *MockFactory_Init_Call) RunAndReturn(run func(*paramtable.ComponentParam)) *MockFactory_Init_Call
type MockFactory_NewMsgStreamDisposer_Call ¶
MockFactory_NewMsgStreamDisposer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewMsgStreamDisposer'
func (*MockFactory_NewMsgStreamDisposer_Call) Return ¶
func (_c *MockFactory_NewMsgStreamDisposer_Call) Return(_a0 func([]string, string) error) *MockFactory_NewMsgStreamDisposer_Call
func (*MockFactory_NewMsgStreamDisposer_Call) Run ¶
func (_c *MockFactory_NewMsgStreamDisposer_Call) Run(run func(ctx context.Context)) *MockFactory_NewMsgStreamDisposer_Call
func (*MockFactory_NewMsgStreamDisposer_Call) RunAndReturn ¶
func (_c *MockFactory_NewMsgStreamDisposer_Call) RunAndReturn(run func(context.Context) func([]string, string) error) *MockFactory_NewMsgStreamDisposer_Call
type MockFactory_NewMsgStream_Call ¶
MockFactory_NewMsgStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewMsgStream'
func (*MockFactory_NewMsgStream_Call) Return ¶
func (_c *MockFactory_NewMsgStream_Call) Return(_a0 msgstream.MsgStream, _a1 error) *MockFactory_NewMsgStream_Call
func (*MockFactory_NewMsgStream_Call) Run ¶
func (_c *MockFactory_NewMsgStream_Call) Run(run func(ctx context.Context)) *MockFactory_NewMsgStream_Call
func (*MockFactory_NewMsgStream_Call) RunAndReturn ¶
func (_c *MockFactory_NewMsgStream_Call) RunAndReturn(run func(context.Context) (msgstream.MsgStream, error)) *MockFactory_NewMsgStream_Call
type MockFactory_NewPersistentStorageChunkManager_Call ¶
MockFactory_NewPersistentStorageChunkManager_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewPersistentStorageChunkManager'
func (*MockFactory_NewPersistentStorageChunkManager_Call) Return ¶
func (_c *MockFactory_NewPersistentStorageChunkManager_Call) Return(_a0 storage.ChunkManager, _a1 error) *MockFactory_NewPersistentStorageChunkManager_Call
func (*MockFactory_NewPersistentStorageChunkManager_Call) Run ¶
func (_c *MockFactory_NewPersistentStorageChunkManager_Call) Run(run func(ctx context.Context)) *MockFactory_NewPersistentStorageChunkManager_Call
func (*MockFactory_NewPersistentStorageChunkManager_Call) RunAndReturn ¶
func (_c *MockFactory_NewPersistentStorageChunkManager_Call) RunAndReturn(run func(context.Context) (storage.ChunkManager, error)) *MockFactory_NewPersistentStorageChunkManager_Call
type MockFactory_NewTtMsgStream_Call ¶
MockFactory_NewTtMsgStream_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewTtMsgStream'
func (*MockFactory_NewTtMsgStream_Call) Return ¶
func (_c *MockFactory_NewTtMsgStream_Call) Return(_a0 msgstream.MsgStream, _a1 error) *MockFactory_NewTtMsgStream_Call
func (*MockFactory_NewTtMsgStream_Call) Run ¶
func (_c *MockFactory_NewTtMsgStream_Call) Run(run func(ctx context.Context)) *MockFactory_NewTtMsgStream_Call
func (*MockFactory_NewTtMsgStream_Call) RunAndReturn ¶
func (_c *MockFactory_NewTtMsgStream_Call) RunAndReturn(run func(context.Context) (msgstream.MsgStream, error)) *MockFactory_NewTtMsgStream_Call