CUB-203: add WebSocket client scaffold for OpenClaw gateway v3
Some checks failed
Dev Build / build-test (pull_request) Failing after 14s

This commit is contained in:
Dex
2026-05-20 11:02:21 +00:00
parent 519e872027
commit 70d39b87d1
5 changed files with 445 additions and 6 deletions

View File

@@ -10,13 +10,15 @@ import (
// Config holds all application configuration.
type Config struct {
Port int
DatabaseURL string
CORSOrigin string
LogLevel string
Environment string
GatewayURL string
Port int
DatabaseURL string
CORSOrigin string
LogLevel string
Environment string
GatewayURL string
GatewayPollInterval time.Duration
WSGatewayURL string
WSGatewayToken string
}
// Load reads configuration from environment variables, applying defaults where
@@ -30,6 +32,8 @@ func Load() *Config {
Environment: getEnv("ENVIRONMENT", "development"),
GatewayURL: getEnv("GATEWAY_URL", "http://localhost:18789/api/agents"),
GatewayPollInterval: getEnvDuration("GATEWAY_POLL_INTERVAL", 5*time.Second),
WSGatewayURL: getEnv("WS_GATEWAY_URL", "ws://localhost:18789/"),
WSGatewayToken: getEnv("OPENCLAW_GATEWAY_TOKEN", ""),
}
}