Documentation
¶
Overview ¶
Package config provides environment-based configuration for handler services with optional live reload of secrets and service endpoints.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Settings ¶
type Settings struct {
// Service identification (immutable)
ServiceName string
ServiceVersion string
ServiceNamespace string
DeploymentEnv string
// NATS configuration (immutable)
NATSURL string
NATSUser string
NATSPassword string
NATSQueueGroup string
// Redis/Valkey configuration (immutable)
RedisURL string
RedisPassword string
// Milvus configuration (immutable)
MilvusHost string
MilvusPort int
MilvusCollection string
// OpenTelemetry configuration (immutable)
OTELEnabled bool
OTELEndpoint string
OTELUseHTTP bool
// HyperDX configuration (immutable)
HyperDXEnabled bool
HyperDXAPIKey string
HyperDXEndpoint string
// MLflow configuration (immutable)
MLflowTrackingURI string
MLflowExperimentName string
MLflowEnabled bool
// Health check configuration (immutable)
HealthPort int
HealthPath string
ReadyPath string
// Timeouts (immutable)
HTTPTimeout time.Duration
NATSTimeout time.Duration
// Secrets path for file-based hot reload (Kubernetes secret mounts)
SecretsPath string
// contains filtered or unexported fields
}
Settings holds base configuration for all handler services. Fields in the "hot-reload" section are protected by a RWMutex and can be updated at runtime via WatchSecrets(). All other fields are immutable after Load() returns.
func Load ¶
func Load() *Settings
Load creates a Settings populated from environment variables with defaults.
func (*Settings) EmbeddingsURL ¶
EmbeddingsURL returns the current embeddings service URL (thread-safe).
func (*Settings) RerankerURL ¶
RerankerURL returns the current reranker service URL (thread-safe).
func (*Settings) WatchSecrets ¶
WatchSecrets watches the SecretsPath directory for changes and reloads hot-reloadable fields. Blocks until ctx is cancelled.