Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewKafkaTopicManager ¶
func NewKafkaTopicManager( ctx context.Context, defaultTopic string, changefeedID model.ChangeFeedID, admin kafka.ClusterAdminClient, cfg *kafka.AutoCreateTopicConfig, ) *kafkaTopicManager
NewKafkaTopicManager creates a new topic manager.
Types ¶
type PulsarTopicManager ¶
type PulsarTopicManager func( cfg *config.PulsarConfig, client pulsar.Client, ) (TopicManager, error)
PulsarTopicManager is a manager for pulsar topics.
type TopicManager ¶
type TopicManager interface { // GetPartitionNum returns the number of partitions of the topic. GetPartitionNum(ctx context.Context, topic string) (int32, error) // CreateTopicAndWaitUntilVisible creates the topic and wait for the topic completion. CreateTopicAndWaitUntilVisible(ctx context.Context, topicName string) (int32, error) // Close closes the topic manager. Close() }
TopicManager is the interface of topic manager. It will be responsible for creating and updating the information of the topic.
func NewMockPulsarTopicManager ¶
func NewMockPulsarTopicManager( cfg *config.PulsarConfig, client pulsar.Client, ) (TopicManager, error)
NewMockPulsarTopicManager creates a new topic manager.
func NewPulsarTopicManager ¶
func NewPulsarTopicManager( cfg *config.PulsarConfig, client pulsar.Client, ) (TopicManager, error)
NewPulsarTopicManager creates a new topic manager.
Click to show internal directories.
Click to hide internal directories.