Skip to content
Intelligently and flexibly pool among multiple hosts from your Go application
Go
Branch: master
Clone or download

Latest commit

Latest commit 5d3b4dc Dec 24, 2019

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
.travis.yml
LICENSE
README.md
epsilon_greedy.go
epsilon_value_calculators.go
example_test.go
go.mod
go.sum
host_entry.go
hostpool.go
hostpool_test.go

README.md

go-hostpool

Build Status GoDoc GitHub release

A Go package to intelligently and flexibly pool among multiple hosts from your Go application. Host selection can operate in round robin or epsilon greedy mode, and unresponsive hosts are avoided. Usage example:

hp := hostpool.NewEpsilonGreedy([]string{"a", "b"}, 0, &hostpool.LinearEpsilonValueCalculator{})
hostResponse := hp.Get()
hostname := hostResponse.Host()
err := _ // (make a request with hostname)
hostResponse.Mark(err)

View more detailed documentation on godoc.org

You can’t perform that action at this time.