Versions in this module Expand all Collapse all v0 v0.0.1 Sep 14, 2025 Changes in this version + type Client struct + func (c *Client) Deregister(_ context.Context, serviceID string) error + func (c *Client) Register(_ context.Context, svc *registry.ServiceInstance, enableHealthCheck bool) error + func (c *Client) Service(ctx context.Context, service string, index uint64, passingOnly bool) ([]*registry.ServiceInstance, uint64, error) + type Config struct + type Datacenter string + const MultiDatacenter + const SingleDatacenter + type Option func(*Registry) + func WithDatacenter(dc Datacenter) Option + func WithDeregisterCriticalServiceAfter(interval int) Option + func WithHealthCheck(enable bool) Option + func WithHealthCheckInterval(interval int) Option + func WithHeartbeat(enable bool) Option + func WithServiceCheck(checks ...*api.AgentServiceCheck) Option + func WithServiceResolver(fn ServiceResolver) Option + func WithTimeout(timeout time.Duration) Option + type Registry struct + func New(apiClient *api.Client, opts ...Option) *Registry + func NewRegistry(c *conf.Registry) *Registry + func (r *Registry) Deregister(ctx context.Context, svc *registry.ServiceInstance) error + func (r *Registry) GetService(ctx context.Context, name string) ([]*registry.ServiceInstance, 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) + type ServiceResolver func(ctx context.Context, entries []*api.ServiceEntry) []*registry.ServiceInstance