Versions in this module Expand all Collapse all v0 v0.9.0 Apr 4, 2019 Changes in this version + var ErrNoHosts = errors.New("no hosts available") + func RegisterSubscriberFactory(name string, sf SubscriberFactory) error + type Balancer interface + Host func() (string, error) + func NewRandomLB(subscriber Subscriber, seed int64) Balancer + func NewRoundRobinLB(subscriber Subscriber) Balancer + type FixedSubscriber []string + func (s FixedSubscriber) Hosts() ([]string, error) + type Register struct + func GetRegister() *Register + func (r *Register) Get(name string) SubscriberFactory + func (r *Register) Register(name string, sf SubscriberFactory) error + type Subscriber interface + Hosts func() ([]string, error) + func FixedSubscriberFactory(cfg *config.Backend) Subscriber + func GetSubscriber(cfg *config.Backend) Subscriber + type SubscriberFactory func(*config.Backend) Subscriber + type SubscriberFunc func() ([]string, error) + func (f SubscriberFunc) Hosts() ([]string, error)