config

package
v0.0.0-...-94024fc Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(logger zerolog.Logger)

Init initializes the configuration and starts watching for changes.

Types

type Config

type Config struct {
	Server       ServerConfig       `mapstructure:"server"`
	Kafka        KafkaConfig        `mapstructure:"kafka"`
	Notification NotificationConfig `mapstructure:"notifications"`
}

func GetConfig

func GetConfig() Config

GetConfig returns a copy of the current configuration. This makes it safe to use in concurrent operations and makes it impossible to modify the configuration from outside the package.

type KafkaConfig

type KafkaConfig struct {
	BootstrapServers     string `mapstructure:"bootstrap-servers"`
	RequiredAcks         int    `mapstructure:"required-acks"`
	MaxRetries           int    `mapstructure:"max-retries"`
	MessageChannelBuffer int    `mapstructure:"message-channel-buffer"`
	WorkerPoolSize       int    `mapstructure:"worker-pool-size"`
	BatchSize            int    `mapstructure:"batch-size"`
	BatchTimeoutMs       int    `mapstructure:"batch-timeout-ms"`
}

type NotificationConfig

type NotificationConfig struct {
	ChannelTopics   map[string]string `mapstructure:"channel-topics"`
	DeadLetterTopic string            `mapstructure:"dead-letter-topic"`
	IsProduceAsync  bool              `mapstructure:"is-produce-async"`
}

type ServerConfig

type ServerConfig struct {
	Port string
}

Jump to

Keyboard shortcuts

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