Auto-discovery of Hindsight API endpoints.
Probes default endpoints in order:
Uses GET /health with 2-second timeout for fast discovery. Results are cached in ETS for session lifetime.
Hindsight 0.4+
Uses REST API (not MCP). Health at /health, operations at /v1/default/banks/....
Summary
Functions
Returns cached discovery result without probing.
Discovers Hindsight endpoint by probing default URLs.
Runs discovery asynchronously (non-blocking).
Probes a specific URL for health via GET /health.
Clears cached discovery and re-probes endpoints.
Functions
@spec cached_url() :: String.t() | nil
Returns cached discovery result without probing.
@spec discover() :: String.t() | nil
Discovers Hindsight endpoint by probing default URLs.
Returns the first responding endpoint or nil if none found.
@spec discover_async() :: Task.t()
Runs discovery asynchronously (non-blocking).
Probes a specific URL for health via GET /health.
@spec refresh() :: String.t() | nil
Clears cached discovery and re-probes endpoints.