config

package
v0.0.0-...-66886dd Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 3 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitCommonConfig

func InitCommonConfig(options ...ConfigOption)

func NewParamGroup

func NewParamGroup(m map[string]string) paramtable.ParamGroup

func NewParamItem

func NewParamItem(value string) paramtable.ParamItem

nolint

Types

type CommonConfig

type CommonConfig struct {
	Retry RetrySettings
}

func GetCommonConfig

func GetCommonConfig() *CommonConfig

type ConfigOption

type ConfigOption func(config *CommonConfig)

type EtcdRetryConfig

type EtcdRetryConfig struct {
	Retry RetrySettings
}

type EtcdServerConfig

type EtcdServerConfig struct {
	Address     []string `yaml:"address"`
	RootPath    string   `yaml:"rootPath"`
	MetaSubPath string   `yaml:"metaSubPath"`

	// Auth config
	EnableAuth bool   `yaml:"enableAuth"`
	Username   string `yaml:"username"`
	Password   string `yaml:"password"`

	// TLS config
	EnableTLS     bool   `yaml:"enableTLS"`
	TLSCertPath   string `yaml:"tlsCertPath"`
	TLSKeyPath    string `yaml:"tlsKeyPath"`
	TLSCACertPath string `yaml:"tlsCACertPath"`
	TLSMinVersion string `yaml:"tlsMinVersion"`
}

type KafkaConfig

type KafkaConfig struct {
	Address          string
	Producer         map[string]string
	Consumer         map[string]string
	SaslUsername     string
	SaslPassword     string
	SaslMechanisms   string
	SecurityProtocol string
}

type MQConfig

type MQConfig struct {
	Pulsar PulsarConfig
	Kafka  KafkaConfig
}

type Option

type Option[T any] interface {
	Apply(object T)
}

type OptionFunc

type OptionFunc[T any] func(object T)

func (OptionFunc[T]) Apply

func (o OptionFunc[T]) Apply(object T)

type PulsarConfig

type PulsarConfig struct {
	Address        string
	WebAddress     string
	WebPort        int
	MaxMessageSize string

	// support tenant
	Tenant    string
	Namespace string

	AuthPlugin string
	AuthParams string
}

type ReaderConfig

type ReaderConfig struct {
	MessageBufferSize int
	TTInterval        int
	Retry             RetrySettings
	SourceChannelNum  int
	TargetChannelNum  int
	ReplicateID       string
}

type RetrySettings

type RetrySettings struct {
	RetryTimes  int
	InitBackOff int
	MaxBackOff  int
}

type WriterConfig

type WriterConfig struct {
	MessageBufferSize int
	Retry             RetrySettings
}

Jump to

Keyboard shortcuts

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