Bier.CLI.Ready (bier v0.1.0)

Copy Markdown View Source

The client half of the --ready flag (PostgREST Client.hs): GET the admin server's /ready endpoint and report the outcome the way PostgREST's http-client wrapper does — OK: <url> on a 2xx, ERROR: <url> on any other response, ERROR: connection refused to <url> when the request fails.

Kept out of Bier.CLI.run/2 so the core stays IO-free: run/2 returns {:ready, url} (or the config-derived failures directly) and main/1 calls check/1 to perform the request.

Summary

Functions

GET url and map the outcome to a %{stdout, stderr, exit} result.

Functions

check(url)

@spec check(String.t()) :: Bier.CLI.result()

GET url and map the outcome to a %{stdout, stderr, exit} result.