metadata_plugs v0.3.1 MetadataPlugs.Health

This plug provides a health endpoint.

The purpose of this endpoint is send a heartbeat response when the server is up.

Options

The plug listens by default the /health endpoint. See opts/0 for more info.

Request

The configured endpoint should be called via an HTTP/GET request.

When this endpoint is called, the server responds with an HTTP 200 OK containing the following body:

{"status": "up"}

Link to this section Summary

Types

Plug options

Functions

Resolves a health request.

Link to this section Types

Link to this type

opts()
opts() :: [{:path, String.t()}]

Plug options:

  • path: The health endpoint path, defaults to /health.

Link to this section Functions

Link to this function

call(conn, opts)

Resolves a health request.