Agent address, ACL token, datacenter, and wait
The HTTP seam
Supplies timers and uuid() for the default instance id
Removes this instance from the agent.
The registration to remove
Headers every request carries; the ACL header is omitted when unset.
Builds the health-read URL.
Always sends passing=true: self-registration advertises the instance
before its socket is bound, and filtering on passing checks is what makes
that window harmless for every consumer.
Logical service name
Optionalindex: number
Blocking-query index, omitted for a plain read
The absolute URL
M70c: probes the agent's leader endpoint — GET /v1/status/leader — through
the existing IDiscoveryHttp seam. 2xx means the agent is reachable; any
other status or a transport failure means it is not. The runtime aborts
the request after 2 s so a hung agent cannot hold the connection open.
Maps a health response body onto instances.
The parsed JSON array
Fallback service name when the entry omits one
The mapped instances
Advertises this instance to the agent.
What to advertise, with its check already defaulted
Reads the current instance list for a service.
Logical service name
Every instance the backend reports, possibly empty
The instance id used for both register and deregister.
Generated once per registration object rather than per call, because a fresh uuid on deregistration would target an id that was never registered.
The registration
Its stable instance id
Subscribes to instance-list changes.
Push-based where the backend supports it, interval-polled where it does not. The listener always receives the full list.
Logical service name
Called with the full instance list on every change
Unsubscribe function that stops the underlying watch
Reads and registers against a Consul agent.
Since
0.2.0