Fast.Plug.Ready (Fast v0.11.0)
View SourceA plug for responding to "ready" check requests.
This plug responds with "200 YES" when ready, "423 NO" otherwise.
It checks the :ready_for_traffic env var to determine
if the application is ready for traffic.
Options
:otp_app- app name that the config belongs to:path- request path string to handle requests for:json- a boolean to decide whether response should be json
Examples
defmodule MyServer do
use Plug.Builder
plug Fast.Plug.Ready
# ... rest of the pipelineend
Using a custom path:
defmodule MyServer do
use Plug.Builder
plug Fast.Plug.Ready, otp_app: :my_app, path: "/ready"
# ... rest of the pipelineend
Summary
Functions
Callback implementation for Plug.call/2.
Callback implementation for Plug.init/1.