BtrzHealthchecker v0.2.3 BtrzHealthchecker.Checkers.Postgres View Source

Defines the Postgres status checker.

Link to this section Summary

Functions

Returns the status of the postgres service querying by all the tables of the catalog

Returns the name of the service

Link to this section Functions

Returns the status of the postgres service querying by all the tables of the catalog

Returns 200 if the conection is reachable and the check query can be executed. Returns 500 in case of Postgrex.Error or other like ArgumentError, DBConnection.ConnectionError, DBConnection.OwnershipError or RuntimeError.

Examples

iex> BtrzHealthchecker.Checkers.Postgres.check_status(opts)
200
iex> BtrzHealthchecker.Checkers.Postgres.check_status(bad_opts)
500

Returns the name of the service

Returns “postgres”.