Versions in this module Expand all Collapse all v1 v1.5.5 Oct 25, 2023 Changes in this version + func NewRegistry(consulAddr string, id string, instanceName string, instanceEndpoints []string) (registry.Registry, *registry.ServiceInstance, error) + type Client struct + func NewClient(cli *api.Client) *Client + func (d *Client) Deregister(_ context.Context, serviceID string) error + func (d *Client) Register(_ context.Context, svc *registry.ServiceInstance, enableHealthCheck bool) error + func (d *Client) Service(ctx context.Context, service string, index uint64, passingOnly bool) ([]*registry.ServiceInstance, uint64, error) + type Config struct + type Option func(*Registry) + func WithHealthCheck(enable bool) Option + type Registry struct + func New(apiClient *api.Client, opts ...Option) *Registry + func (r *Registry) Deregister(ctx context.Context, svc *registry.ServiceInstance) error + func (r *Registry) GetService(_ context.Context, name string) (services []*registry.ServiceInstance, err error) + func (r *Registry) ListServices() (allServices map[string][]*registry.ServiceInstance, err error) + func (r *Registry) Register(ctx context.Context, svc *registry.ServiceInstance) error + func (r *Registry) Watch(_ context.Context, name string) (registry.Watcher, error)