config

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package config provides application configuration management through environment variables.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Server configuration
	ServerHost string
	ServerPort int

	// Database configuration
	DBDriver             string
	DBConnectionString   string
	DBMaxOpenConnections int
	DBMaxIdleConnections int
	DBConnMaxLifetime    time.Duration

	// Logging
	LogLevel string

	// Worker configuration
	WorkerInterval      time.Duration
	WorkerBatchSize     int
	WorkerMaxRetries    int
	WorkerRetryInterval time.Duration
}

Config holds all application configuration

func Load

func Load() *Config

Load loads configuration from environment variables. It first attempts to load a .env file by searching recursively from the current directory up to the root directory. If no .env file is found, it continues with existing environment variables.

Jump to

Keyboard shortcuts

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