Parrhesia.Plug
(parrhesia v0.12.0)
Copy Markdown
Official Plug interface for mounting Parrhesia HTTP/WebSocket ingress in a host app.
This plug serves the same route surface as the built-in listener endpoint:
GET /healthby default, or the listener-configured health pathGET /readyby default, or the listener-configured ready pathGET /relayby default, or the listener-configured relay pathPOST /managementby default, or the listener-configured management pathGET /metricsby default, or the listener-configured metrics path
Options
:listener- listener configuration used to authorize and serve requests. Supported values:- an atom listener id from
config :parrhesia, :listeners(for example:public) - a listener config map/keyword list (same schema as
:listenersentries)
- an atom listener id from
When a host app owns the HTTPS edge, a common pattern is:
config :parrhesia, :listeners, %{}and mount Parrhesia.Plug with an explicit :listener map.
Summary
Types
@type option() :: {:listener, listener_option()}