Documentation ¶
Index ¶
Constants ¶
View Source
const DEFAULT_HEALTH_CHECK_INTERVAL_IN_SEC int = 20
View Source
const DEFAULT_MAX_RETRIES int = 3
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Port int `yaml:"lb_port"` Backends []string `yaml:"backends"` Strategy string `yaml:"strategy"` HealthCheckIntervalInSec int `yaml:"health_check_interval_in_sec"` MaxRetries int `yaml:"max_retries"` }
func GetLBConfig ¶
type LBStrategy ¶
type LBStrategy int
const ( RoundRobin LBStrategy = iota LeastConnected )
func GetLBStrategy ¶
func GetLBStrategy(strategy string) LBStrategy
Click to show internal directories.
Click to hide internal directories.