sp4-debug-1770477266/services/chat-svc/internal/config/config.go
rdev-worker 5a877ca1a1
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
feat: implement mesh-interop service communication
Add auth-svc /validate endpoint for token checking
Add chat-svc with auth client and Redis task queue
Add worker-svc chat handler for task processing

Co-Authored-By: Claude Code <claude@anthropic.com>
2026-02-07 16:45:22 +00:00

39 lines
892 B
Go

// Package config provides service-specific configuration.
package config
import (
"os"
"strings"
"git.threesix.ai/jordan/sp4-debug-1770477266/pkg/config"
)
// Config extends the base config with chat-svc-specific settings.
type Config struct {
config.AppConfig
Server config.ServerConfig
Database config.DatabaseConfig
Logging config.LoggingConfig
// Auth
AuthEnabled bool
JWTSecret string
// Redis queue URL for pushing tasks to worker-svc
RedisURL string
}
// Load reads configuration from environment variables.
func Load() *Config {
return &Config{
AppConfig: config.ReadAppConfig(),
Server: config.ReadServerConfig(),
Database: config.ReadDatabaseConfig(),
Logging: config.ReadLoggingConfig(),
AuthEnabled: strings.EqualFold(os.Getenv("AUTH_ENABLED"), "true"),
JWTSecret: os.Getenv("JWT_SECRET"),
RedisURL: os.Getenv("REDIS_URL"),
}
}