Skip to main content

Module wire

Module wire 

Source
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 its encoding (utf8 by default, or hex).