Gralkor.Connection (gralkor v1.1.0)

Copy Markdown View Source

Boot-readiness gate for a Gralkor backend.

init/1 synchronously polls Gralkor.Client.impl().health_check/0 until it responds healthy or the boot window expires. A timeout stops the GenServer with {:gralkor_unreachable, reason} so the consumer's supervisor decides whether to retry or give up.

After boot this process sits idle. Runtime outages surface via fail-fast on the next actual call; Gralkor.Server's own health monitor is what restarts the Python child if /health starts failing. Duplicating that monitoring here races uvicorn's HTTP keep-alive and produces spurious up → down transitions.

Summary

Functions

Returns a specification to start this module under a supervisor.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts \\ [])