round-robin is balancing algorithm written in golang
go get github.com/hlts2/round-robin
rr, _ := roundrobin.New(
&url.URL{Host: "192.168.33.10"},
&url.URL{Host: "192.168.33.11"},
&url.URL{Host: "192.168.33.12"},
&url.URL{Host: "192.168.33.13"},
)
rr.Next() // {Host: "192.168.33.10"}
rr.Next() // {Host: "192.168.33.11"}
rr.Next() // {Host: "192.168.33.12"}
rr.Next() // {Host: "192.168.33.13"}
rr.Next() // {Host: "192.168.33.10"}
rr.Next() // {Host: "192.168.33.11"}
round-robin released under MIT license, refer LICENSE file.