Versions in this module Expand all Collapse all v1 v1.4.1 Nov 16, 2022 v1.4.0 Nov 16, 2022 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(ctx context.Context, serviceID string) error + func (d *Client) Register(ctx 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(ctx 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(ctx context.Context, name string) (registry.Watcher, error)