Xamal.HealthCheck (xamal v0.3.0)

Copy Markdown View Source

HTTP health check polling for deployment readiness.

Polls a health check endpoint until it returns 200, or times out.

Summary

Functions

Check health via SSH by curling from the remote server. Returns a command that can be executed remotely.

Poll a health check endpoint until it returns 200.

Poll health check via SSH on a remote host.

Functions

check_command(port, path \\ "/health")

Check health via SSH by curling from the remote server. Returns a command that can be executed remotely.

wait_until_ready(host, port, opts \\ [])

Poll a health check endpoint until it returns 200.

Options:

  • path: the HTTP path (default "/health")
  • interval: seconds between checks (default 1)
  • timeout: max seconds to wait (default 30)
  • port: the port to check

Returns :ok or {:error, :timeout}

wait_until_ready_remote(host, port, config, opts \\ [])

Poll health check via SSH on a remote host.