configuration

package
v0.0.0-...-f00fb6a Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(logLevel string) *slog.Logger

Types

type ApiConfig

type ApiConfig struct {
	Enabled bool   `mapstructure:"enabled"`
	Host    string `mapstructure:"host"`
	Port    string `mapstructure:"port"`
}

type Configuration

type Configuration struct {
	LogLevel      string `mapstructure:"log_level"`
	Logger        *slog.Logger
	OutputPath    string `mapstructure:"output_path"`
	InputPath     string `mapstructure:"input_path"`
	InternalQueue chan event.Event
	Api           ApiConfig    `mapstructure:"api"`
	Kafka         KafkaConfig  `mapstructure:"kafka"`
	Job           JobConfig    `mapstructure:"job"`
	Ffmpeg        FfmpegConfig `mapstructure:"ffmpeg"`
}

func NewConfiguration

func NewConfiguration() *Configuration

type FfmpegConfig

type FfmpegConfig struct {
	Path string `mapstructure:"path"`
}

type JobConfig

type JobConfig struct {
	Enabled bool `mapstructure:"enabled"`
	Workers int  `mapstructure:"workers"`
}

type KafkaConfig

type KafkaConfig struct {
	Enabled             bool                `mapstructure:"enabled"`
	KafkaProducerConfig KafkaProducerConfig `mapstructure:"producer"`
	KafkaConsumerConfig KafkaConsumerConfig `mapstructure:"consumer"`
}

type KafkaConsumerConfig

type KafkaConsumerConfig struct {
	Brokers []string `mapstructure:"brokers"`
	GroupID string   `mapstructure:"group_id"`
	Topic   string   `mapstructure:"topic"`
	Offset  string   `mapstructure:"offset"`
}

type KafkaProducerConfig

type KafkaProducerConfig struct {
	Brokers []string `mapstructure:"brokers"`
	Topic   string   `mapstructure:"topic"`
}

Jump to

Keyboard shortcuts

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