Versions in this module Expand all Collapse all v1 v1.0.0 Dec 12, 2019 Changes in this version + const LbStopped + const TargetAdded + const TargetRemoved + var DownErr = errors.New("lb down") + var PausedErr = errors.New("lb paused") + type KeyLbNotifier interface + func NewEtcdLoadBalancer(ctx context.Context, cli *clientv3.Client, path string, myTarget string, ...) (KeyLbNotifier, error) + type KeyLoadBalancer interface + Close func() + Target func(key string, waitSettleTime bool) (string, error) + func NewStaticLB(mykey string, allKeys []string) KeyLoadBalancer + func NewStaticLbFromIndexes(prefix string, myIndex, all int) KeyLoadBalancer + type LbEvent struct + CreatedOn time.Time + Event string + Target string + func NewAddedEvent(target string) *LbEvent + func NewLbStoppedEvent() *LbEvent + func NewRemovedEvent(target string) *LbEvent + type LbNotifier interface + Notify func() <-chan *LbEvent + NotifyBulk func() <-chan []*LbEvent + type Option func(config *optionalConfig) + func WithSetleTime(d time.Duration) Option + func WithSubPath(subPath string) Option