Skip to content

Instantly share code, notes, and snippets.

@KamilLelonek
Created July 20, 2019 10:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KamilLelonek/9159022531f1fd89ee1e2129dd8177e6 to your computer and use it in GitHub Desktop.
Save KamilLelonek/9159022531f1fd89ee1e2129dd8177e6 to your computer and use it in GitHub Desktop.
defmodule Healthchex.Probes.Liveness do
import Plug.Conn
@default_path Application.get_env(:healthchex, :liveness_path, "/health/live")
@default_resp Application.get_env(:healthchex, :liveness_response, "OK")
def init(opts) do
%{
path: Keyword.get(opts, :path, @default_path),
resp: Keyword.get(opts, :resp, @default_resp)
}
end
def call(conn, _opts), do: conn
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment