refactor: Remove default configuration constants and simplify config parsing
This commit is contained in:
@@ -18,15 +18,6 @@ const (
|
||||
EnvResponseTimeout = "RESPONSE_TIMEOUT"
|
||||
)
|
||||
|
||||
// Default configuration values
|
||||
const (
|
||||
DefaultLogLevel = zerolog.InfoLevel
|
||||
DefaultNumWorkers = 5
|
||||
DefaultWorkerBatchSize = 100
|
||||
DefaultMaxResponseSize = 1048576 // 1MB
|
||||
DefaultResponseTimeout = 30 // seconds
|
||||
)
|
||||
|
||||
// Config holds the application configuration loaded from environment variables
|
||||
type Config struct {
|
||||
LogLevel zerolog.Level // Logging level (debug, info, warn, error)
|
||||
@@ -34,7 +25,7 @@ type Config struct {
|
||||
MaxResponseSize int // Maximum size of response in bytes
|
||||
NumOfWorkers int // Number of concurrent workers
|
||||
ResponseTimeout int // Timeout for responses in seconds
|
||||
WorkerBatchSize int // Batch size for worker processing
|
||||
WorkerBatchSize int // Batch size for worker processing
|
||||
}
|
||||
|
||||
// String returns a string representation of the configuration
|
||||
|
||||
Reference in New Issue
Block a user