Documentation ¶
Index ¶
Constants ¶
View Source
const ( LeastBusy = "least_busy" RoundRobin = "round_robin" )
Available strategies for the pool.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Balancer ¶
type Balancer struct { *httputil.ReverseProxy // contains filtered or unexported fields }
Balancer is the reverse proxy server that balances requests.
func NewBalancer ¶
NewBalancer creates a new balancer to balance requests between hosts and uses specified strategy.
type Config ¶
Config models the configuations that is available for the balancer.
func MustParseConfig ¶
MustParseConfig parse and config file and panics on failure.
func ParseConfig ¶
ParseConfig reads a json file and maps it to a Config object.
Click to show internal directories.
Click to hide internal directories.