feat: add Temporal config and update routing with memory service integration

- Add TemporalConfig struct to internal/config
- Update gateway config with Temporal frontend service (port 7233)
- Update router with memory service adapter support
- Add config.local.yaml with memory service configuration
- Encrypt production config with SOPS (AES256_GCM)
- Support X-Service header routing pattern for service discovery
- Keep legacy path-based routes with deprecation warnings
- All 5 adapters preserved: workflow, memory, sqs, s3, iam
This commit is contained in:
Admin Bot
2026-09-13 10:56:18 +09:00
parent 67f24ea763
commit b8f95506ca
4 changed files with 47 additions and 128 deletions
+17
View File
@@ -24,6 +24,8 @@ type Config struct {
Adapters []*serviceadapter.ServiceAdapter
// Auth holds JWT authentication configuration for /v1/* endpoints.
Auth AuthConfig
// Temporal holds Temporal server configuration.
Temporal TemporalConfig
}
// ModelUpstream holds upstream configuration for a specific model.
@@ -38,6 +40,12 @@ type ModelUpstream struct {
AuthRequired bool
}
// TemporalConfig holds Temporal server configuration.
type TemporalConfig struct {
// HostPort is the address of the Temporal server (host:port).
HostPort string
}
// AuthConfig holds JWT authentication configuration.
type AuthConfig struct {
// Enabled globally enables/disables auth for /v1/* endpoints.
@@ -138,6 +146,12 @@ func Load() (*Config, error) {
authConfig = loadedAuth
}
temporalHostPort := "localhost:7233"
// Allow override via environment variable
if hostPort, ok := os.LookupEnv("TEMPORAL_HOST_PORT"); ok {
temporalHostPort = hostPort
}
return &Config{
ListenAddr: listenAddr,
ShutdownTimeout: shutdownTimeout,
@@ -145,5 +159,8 @@ func Load() (*Config, error) {
Models: models,
Adapters: adapters,
Auth: authConfig,
Temporal: TemporalConfig{
HostPort: temporalHostPort,
},
}, nil
}