Fettle Plug
Plug support for Fettle health-checks.
Getting Started
Installation
def deps do
[
{:fettle_plug, "~> 1.0"}
]
endFor the latest (and most unstable) version:
def deps do
[
{:fettle_plug, github: "Financial-Times/fettle_plug"}
]
endfettle_plug has a transitive dependency on fettle.
Setup
In your Plug pipeline (Phoenix.Endpoint etc.), use Fettle.Plug to serve your results from your desired URL:
Plug example:
use Plug.Router
plug :match
# serve health check results under /__meta/health
plug Fettle.Plug, path_info: ["__meta", "health"]
# other routes
match _, do: send_resp(conn, 404, "Route Not Found\n")
plug :dispatchpath_infodefaults to["__health"]; it may be given as[]for use underforwardetc.-
A
schemaoption uses a customFettle.Schemaimplementation;Fettle.Schema.FTHealthCheckV1is the default.