Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Server
ServerPort string `mapstructure:"SERVER_PORT"`
SwaggerEnabled bool `mapstructure:"SWAGGER_ENABLED"`
// Dapr
DaprHost string `mapstructure:"DAPR_HOST"`
DaprPort string `mapstructure:"DAPR_PORT"`
DBBindingName string `mapstructure:"DB_BINDING_NAME"` // Dapr binding component name for DB access (server binary)
DaprMaxRetries int `mapstructure:"DAPR_MAX_RETRIES"`
// Logging
LogLevel string `mapstructure:"LOG_LEVEL"`
LogFormat string `mapstructure:"LOG_FORMAT"` // "json" (default) or "console" (colored dev output)
// Observability
ServiceName string `mapstructure:"APP_NAME"`
OTelEndpoint string `mapstructure:"OTEL_ENDPOINT"`
OTelSampleRate float64 `mapstructure:"OTEL_SAMPLE_RATE"` // 0.0–1.0; fraction of root spans sampled
PyroscopeEndpoint string `mapstructure:"PYROSCOPE_ENDPOINT"`
// Timeouts
LLMTimeoutRaw string `mapstructure:"LLM_TIMEOUT"` // e.g. "10s"
LLMTimeout time.Duration // parsed from LLMTimeoutRaw in Load()
ShutdownTimeoutRaw string `mapstructure:"SHUTDOWN_TIMEOUT"` // e.g. "5s", "10s"
ShutdownTimeout time.Duration // parsed from ShutdownTimeoutRaw in Load()
}
Click to show internal directories.
Click to hide internal directories.