• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.gitignoreH A D24-Dec-2019252

.travis.ymlH A D24-Dec-201969

LICENSEH A D24-Dec-20191 KiB

README.mdH A D24-Dec-2019943

epsilon_greedy.goH A D24-Dec-20195.5 KiB

epsilon_value_calculators.goH A D24-Dec-20191.5 KiB

example_test.goH A D24-Dec-2019275

go.modH A D24-Dec-201989

go.sumH A D24-Dec-2019867

host_entry.goH A D24-Dec-20191.4 KiB

hostpool.goH A D24-Dec-20194.6 KiB

hostpool_test.goH A D24-Dec-20193.5 KiB

README.md

1go-hostpool
2===========
3
4[![Build Status](https://secure.travis-ci.org/bitly/go-hostpool.png?branch=master)](http://travis-ci.org/bitly/go-hostpool) [![GoDoc](https://godoc.org/github.com/bitly/go-hostpool?status.svg)](https://godoc.org/github.com/bitly/go-hostpool) [![GitHub release](https://img.shields.io/github/release/bitly/go-hostpool.svg)](https://github.com/bitly/go-hostpool/releases/latest)
5
6
7A Go package to intelligently and flexibly pool among multiple hosts from your Go application.
8Host selection can operate in round robin or epsilon greedy mode, and unresponsive hosts are
9avoided.
10Usage example:
11
12```go
13hp := hostpool.NewEpsilonGreedy([]string{"a", "b"}, 0, &hostpool.LinearEpsilonValueCalculator{})
14hostResponse := hp.Get()
15hostname := hostResponse.Host()
16err := _ // (make a request with hostname)
17hostResponse.Mark(err)
18```
19
20View more detailed documentation on [godoc.org](http://godoc.org/github.com/bitly/go-hostpool)
21