File: example_test.go

package info (click to toggle)
golang-github-hailocab-go-hostpool 0.0~git20160125.0.e80d13c-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 100 kB
  • sloc: makefile: 2
file content (13 lines) | stat: -rw-r--r-- 324 bytes parent folder | download | duplicates (3)
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)
}