Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SaveConfig ¶
SaveConfig saves configuration to a JSON file
Types ¶
type BackendConfig ¶
BackendConfig holds backend server configuration
type Config ¶
type Config struct {
Server ServerConfig `json:"server"`
Backends []BackendConfig `json:"backends"`
HealthCheck HealthCheckConfig `json:"healthCheck"`
Strategy StrategyConfig `json:"strategy"`
Logging LoggingConfig `json:"logging"`
}
Config represents the application configuration
func LoadConfig ¶
LoadConfig loads configuration from a JSON file
type HealthCheckConfig ¶
type HealthCheckConfig struct {
Interval time.Duration `json:"interval"`
Timeout time.Duration `json:"timeout"`
Path string `json:"path"`
}
HealthCheckConfig holds health check settings
type LoggingConfig ¶
type LoggingConfig struct {
Level string `json:"level"` // debug, info, warn, error
Format string `json:"format"` // text, json
}
LoggingConfig holds logging settings
type ServerConfig ¶
type ServerConfig struct {
Port int `json:"port"`
ReadTimeout time.Duration `json:"readTimeout"`
WriteTimeout time.Duration `json:"writeTimeout"`
IdleTimeout time.Duration `json:"idleTimeout"`
}
ServerConfig holds server-specific settings
type StrategyConfig ¶
type StrategyConfig struct {
Type string `json:"type"` // roundrobin, leastconnections, random, weighted
}
StrategyConfig holds load balancing strategy settings
Click to show internal directories.
Click to hide internal directories.