BtrzHealthchecker v0.2.3 BtrzHealthchecker View Source
BtrzHealthchecker main module.
Used to get the information about the desired services passed as Checkers.
Link to this section Summary
Link to this section Types
A checker that implements the Checker behaviour
Link to this section Functions
Returns the Info struct with the status of the desired services.
Examples
iex> my_connection_opts = %{hostname: "localhost", username: "postgres", password: "mypass", database: "mydb"}
iex> BtrzHealthchecker.info([%{checker_module: BtrzHealthchecker.Checkers.Postgres, opts: my_connection_opts}])
%BtrzHealthchecker.Info{build: "d3b3f9133f68b8877347e06b3d7285dd1d5d3921", commit: "3d7285dd1d5d3921d3b3f9133f68b8877347e06b",
instanceId: "i-b3f9133f68b88", services: [%{name: "postgres", status: 200}], status: 200}
Or without any service
iex> BtrzHealthchecker.info()
%BtrzHealthchecker.Info{build: "d3b3f9133f68b8877347e06b3d7285dd1d5d3921", commit: "3d7285dd1d5d3921d3b3f9133f68b8877347e06b",
instanceId: "i-b3f9133f68b88", services: [], status: 200}