Versions in this module Expand all Collapse all v2 v2.1.3 Sep 16, 2019 v2.1.2 Sep 16, 2019 Changes in this version + var DefaultRegistry = newConsulRegistry() + var ErrNotFound = errors.New("not found") + func Deregister(s *Service) error + func Register(s *Service, opts ...RegisterOption) error + func String() string + type Endpoint struct + Metadata map[string]string + Name string + Request *Value + Response *Value + type Node struct + Address string + Id string + Metadata map[string]string + Port int + type Option func(*Options) + func Addrs(addrs ...string) Option + func Secure(b bool) Option + func TLSConfig(t *tls.Config) Option + func Timeout(t time.Duration) Option + type Options struct + Addrs []string + Context context.Context + Secure bool + TLSConfig *tls.Config + Timeout time.Duration + type RegisterOption func(*RegisterOptions) + func RegisterTTL(t time.Duration) RegisterOption + type RegisterOptions struct + Context context.Context + TTL time.Duration + type Registry interface + Deregister func(*Service) error + GetService func(string) ([]*Service, error) + Init func(...Option) error + ListServices func() ([]*Service, error) + Options func() Options + Register func(*Service, ...RegisterOption) error + String func() string + Watch func(...WatchOption) (Watcher, error) + func NewRegistry(opts ...Option) Registry + type Result struct + Action string + Service *Service + type Service struct + Endpoints []*Endpoint + Metadata map[string]string + Name string + Nodes []*Node + Version string + func GetService(name string) ([]*Service, error) + func ListServices() ([]*Service, error) + type Value struct + Name string + Type string + Values []*Value + type WatchOption func(*WatchOptions) + func WatchService(name string) WatchOption + type WatchOptions struct + Context context.Context + Service string + type Watcher interface + Next func() (*Result, error) + Stop func() + func Watch(opts ...WatchOption) (Watcher, error) Other modules containing this package github.com/leonlau/mqant