Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Server configuration
ListenAddr string
// Database configuration
DatabaseDSN string
// Worker configuration
WorkerInterval time.Duration
RetryMaxAttempts int
RetryInterval time.Duration
// Shutdown configuration
ShutdownDrainTimeout time.Duration
// Auth configuration
// JWTSecret is the HS256 secret used to validate tokens issued by the
// deployer's backend. Set via JWT_SECRET environment variable.
JWTSecret string
// Webhook configuration (fired when a message arrives for an offline user)
WebhookURL string
WebhookSecret string
// WebSocket configuration
// Comma-separated list of allowed origins. Use "*" to allow all (dev only).
AllowedOrigins []string
MaxConnectionsPerUser int
// Rate limiting (applied per user to message sends over REST and WebSocket)
RateLimitMessages float64 // sustained messages per second (0 = disabled)
RateLimitMessagesBurst int // burst allowance
}
Config holds all configuration for the ChatAPI service
Click to show internal directories.
Click to hide internal directories.