Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Router ¶
type Router struct { Addresses []string LastRefresh time.Time RefreshInterval float64 // contains filtered or unexported fields }
Router is a type that contains a set of addresses and methods for resolving them based on use input
func (*Router) NeedsRefresh ¶
func (*Router) ResolveHash ¶
ResolveHash returns an address bound to the hash provided, or picks a new one and binds it
func (*Router) ResolveRandom ¶
ResolveRandom returns a random address
func (*Router) ResolveRoundRobin ¶
ResolveRoundRobin returns the next address, looping back to the first when reaching the end
Click to show internal directories.
Click to hide internal directories.