Medic.Check (Medic v0.2.0) View Source

Reusable check functions

Link to this section Summary

Functions

Usable within a check. If the command exits with a 0 status code, then :ok, is returned. If the command returns a non-zero status code, then {:error, output, remedy} is returned, where output is any text generated by the command.

Link to this section Functions

Link to this function

command_succeeds?(command, args, list)

View Source

Specs

command_succeeds?(binary(), [binary()], [{:remedy, binary()}]) ::
  :ok | {:error, binary(), binary()}

Usable within a check. If the command exits with a 0 status code, then :ok, is returned. If the command returns a non-zero status code, then {:error, output, remedy} is returned, where output is any text generated by the command.

Link to this function

in_list?(item, list, list)

View Source