PhoenixMicro.Phoenix.HealthPlug (PhoenixMicro v1.0.0)

Copy Markdown View Source

A Plug that exposes a JSON health endpoint for phoenix_micro.

Mount in your Phoenix router:

forward "/health/microservices", PhoenixMicro.Phoenix.HealthPlug

Requires {:plug, "~> 1.15"} in your application's deps.

Returns 200 OK when healthy, 503 when degraded.

Summary

Functions

build_health(include_consumers \\ true, include_cbs \\ true)

@spec build_health(boolean(), boolean()) :: map()