Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 11-Oct-2018 | - | ||||
LICENSE | H A D | 11-Oct-2018 | 1 KiB | 22 | 17 | |
README.md | H A D | 11-Oct-2018 | 564 | 18 | 14 | |
epsilon_greedy.go | H A D | 11-Oct-2018 | 5.8 KiB | 221 | 171 | |
epsilon_value_calculators.go | H A D | 11-Oct-2018 | 1.5 KiB | 41 | 22 | |
host_entry.go | H A D | 11-Oct-2018 | 1.4 KiB | 63 | 52 | |
hostpool.go | H A D | 11-Oct-2018 | 5.6 KiB | 244 | 180 |
README.md
1go-hostpool 2=========== 3 4A Go package to intelligently and flexibly pool among multiple hosts from your Go application. 5Host selection can operate in round robin or epsilon greedy mode, and unresponsive hosts are 6avoided. 7Usage example: 8 9```go 10hp := hostpool.NewEpsilonGreedy([]string{"a", "b"}, 0, &hostpool.LinearEpsilonValueCalculator{}) 11hostResponse := hp.Get() 12hostname := hostResponse.Host() 13err := _ // (make a request with hostname) 14hostResponse.Mark(err) 15``` 16 17View more detailed documentation on [godoc.org](http://godoc.org/github.com/bitly/go-hostpool) 18