Versions in this module Expand all Collapse all v1 v1.2.1 Mar 15, 2020 Changes in this version + var DefaultSelector = newDefaultSelector() + var ErrNoneAvailable = errors.New("none available") + var ErrNotFound = errors.New("not found") + type Filter func([]*registry.Service) []*registry.Service + func FilterEndpoint(name string) Filter + func FilterLabel(key, val string) Filter + func FilterVersion(version string) Filter + type Next func() (*registry.Node, error) + func Random(services []*registry.Service) Next + func RoundRobin(services []*registry.Service) Next + type Option func(*Options) + func Registry(r registry.Registry) Option + func SetStrategy(fn Strategy) Option + func SetWatcher(fn Watcher) Option + type Options struct + Context context.Context + Registry registry.Registry + Strategy Strategy + Watcher Watcher + type SelectOption func(*SelectOptions) + func WithFilter(fn ...Filter) SelectOption + func WithStrategy(fn Strategy) SelectOption + type SelectOptions struct + Context context.Context + Filters []Filter + Param []interface{} + Strategy Strategy + type Selector interface + Close func() error + GetService func(name string) ([]*registry.Service, error) + Init func(opts ...Option) error + Mark func(service string, node *registry.Node, err error) + Options func() Options + Reset func(service string) + Select func(service string, opts ...SelectOption) (Next, error) + String func() string + func NewSelector(opts ...Option) Selector + type Strategy func([]*registry.Service) Next + type Watcher func(node *registry.Node)