Expand description
Consul HTTP API shapes, shared by the server and the client: KV entries with their base64 values, catalog and health entries built from the few fields a handler decides, and the agent’s self description. Measured against Consul 1.20.2.
Structs§
- Instance
- A service instance the handler describes: {id?, name, address?, port?, tags?, meta?}.
Constants§
- DATACENTER
- MAX_
ENTRIES - Most entries in one KV listing or catalog answer.
- MAX_
VALUE_ BYTES - Largest KV value Consul accepts, and the largest request body here.
- NODE
- VERSION
Functions§
- agent_
self /v1/agent/self: enough of a description for clients that read it.- agent_
service /v1/agent/services: a map of ID to service.- b64
- catalog_
entry /v1/catalog/service/<name>entries.- check_
key - health_
entry /v1/health/service/<name>entries, each with a passing serf check.- instance
- kv_
entry - One KV entry as the API returns it.
- registration
- A service registration body as the handler sees it.
- shown
- A value as the handler sees it: text when it is UTF-8, otherwise hex, with which one.
- unb64
- value_
bytes - The bytes of an action’s
value, by itsencoding(utf8 by default, or hex).