dependency

package
v0.10.3-0...-7bbfe86 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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 NewDefaultFactory

func NewDefaultFactory(standAlone bool) *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 (f *DefaultFactory) NewMsgStream(ctx context.Context) (msgstream.MsgStream, error)

func (*DefaultFactory) NewMsgStreamDisposer

func (f *DefaultFactory) NewMsgStreamDisposer(ctx context.Context) func([]string, string) error

func (*DefaultFactory) NewPersistentStorageChunkManager

func (f *DefaultFactory) NewPersistentStorageChunkManager(ctx context.Context) (storage.ChunkManager, error)

func (*DefaultFactory) NewTtMsgStream

func (f *DefaultFactory) NewTtMsgStream(ctx context.Context) (msgstream.MsgStream, error)

type Factory

type Factory interface {
	msgstream.Factory
	Init(p *paramtable.ComponentParam)
	NewPersistentStorageChunkManager(ctx context.Context) (storage.ChunkManager, error)
}

type MockFactory

type MockFactory struct {
	mock.Mock
}

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

func (_m *MockFactory) NewMsgStream(ctx context.Context) (msgstream.MsgStream, error)

NewMsgStream provides a mock function with given fields: ctx

func (*MockFactory) NewMsgStreamDisposer

func (_m *MockFactory) NewMsgStreamDisposer(ctx context.Context) func([]string, string) error

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

func (_m *MockFactory) NewTtMsgStream(ctx context.Context) (msgstream.MsgStream, error)

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

type MockFactory_Init_Call struct {
	*mock.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 (*MockFactory_Init_Call) Run

func (*MockFactory_Init_Call) RunAndReturn

type MockFactory_NewMsgStreamDisposer_Call

type MockFactory_NewMsgStreamDisposer_Call struct {
	*mock.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 (*MockFactory_NewMsgStreamDisposer_Call) Run

func (*MockFactory_NewMsgStreamDisposer_Call) RunAndReturn

type MockFactory_NewMsgStream_Call

type MockFactory_NewMsgStream_Call struct {
	*mock.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 (*MockFactory_NewMsgStream_Call) Run

func (*MockFactory_NewMsgStream_Call) RunAndReturn

type MockFactory_NewPersistentStorageChunkManager_Call

type MockFactory_NewPersistentStorageChunkManager_Call struct {
	*mock.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 (*MockFactory_NewPersistentStorageChunkManager_Call) Run

func (*MockFactory_NewPersistentStorageChunkManager_Call) RunAndReturn

type MockFactory_NewTtMsgStream_Call

type MockFactory_NewTtMsgStream_Call struct {
	*mock.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 (*MockFactory_NewTtMsgStream_Call) Run

func (*MockFactory_NewTtMsgStream_Call) RunAndReturn

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL