Malachi. Dashboard
(malachi v0.22.7)
View Source
The built-in HTTP dashboard: a GenServer that listens on a port and serves the operational UI and
metrics endpoints over plain HTTP.
It accepts connections on its listen socket and handles each request in a spawned process, wrapping
the routed handlers with authentication (Malachi.Auth), per-IP rate limiting
(Malachi.RateLimiter), security headers (Malachi.Dashboard.SecurityHeaders), and audit logging
(Malachi.AuditLog).
Summary
Functions
Returns a specification to start this module under a supervisor.
The port the dashboard registered as name bound, which differs from the configured one when that was
Starts the dashboard HTTP server listening on port, registered under the module name.
{port, name: name} registers it under name instead, which is how a test runs one beside the
application's. Port 0 asks the operating system for a free port; port/1 answers which.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec port(atom()) :: :inet.port_number() | nil
The port the dashboard registered as name bound, which differs from the configured one when that was
- After the dashboard stops this is still the last port it bound; nil if it never started. Read from
:persistent_termrather than asked of the server, which spends its life blocked inaccept.
@spec start_link(:inet.port_number() | {:inet.port_number(), keyword()}) :: GenServer.on_start()
Starts the dashboard HTTP server listening on port, registered under the module name.
{port, name: name} registers it under name instead, which is how a test runs one beside the
application's. Port 0 asks the operating system for a free port; port/1 answers which.