File: example_test.go

package info (click to toggle)
golang-github-hailocab-go-hostpool 0.0~git20160125.0.e80d13c-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch, stretch-backports
  • size: 88 kB
  • ctags: 64
  • sloc: makefile: 2
file content (13 lines) | stat: -rw-r--r-- 324 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
package hostpool

import (
	"github.com/bitly/go-hostpool"
)

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