util

package
v0.0.0-...-1e1f271 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEncoderConfig

func GetEncoderConfig(
	changefeedID model.ChangeFeedID,
	sinkURI *url.URL,
	protocol config.Protocol,
	replicaConfig *config.ReplicaConfig,
	maxMsgBytes int,
) (*common.Config, error)

GetEncoderConfig returns the encoder config and validates the config.

func GetFileExtension

func GetFileExtension(protocol config.Protocol) string

GetFileExtension returns the extension for specific protocol

func GetProtocol

func GetProtocol(protocolStr string) (config.Protocol, error)

GetProtocol returns the protocol from the sink URI.

func GetTopic

func GetTopic(sinkURI *url.URL) (string, error)

GetTopic returns the topic name from the sink URI.

func GetTopicManagerAndTryCreateTopic

func GetTopicManagerAndTryCreateTopic(
	ctx context.Context,
	changefeedID model.ChangeFeedID,
	topic string,
	topicCfg *kafka.AutoCreateTopicConfig,
	adminClient kafka.ClusterAdminClient,
) (manager.TopicManager, error)

GetTopicManagerAndTryCreateTopic returns the topic manager and try to create the topic.

func IsPulsarSupportedProtocols

func IsPulsarSupportedProtocols(p config.Protocol) bool

IsPulsarSupportedProtocols returns whether the protocol is supported by pulsar.

Types

This section is empty.

Jump to

Keyboard shortcuts

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