erldns_admin (erldns v7.0.0-rc8)

View Source

Erldns admin API.

Configuration:

This application will read from your sys.config the following example:

{erldns, [
    {admin, [
        {credentials, {<<"username">>, <<"password">>}},
        {port, 8083},
        {middleware, [my_custom_middleware, another_middleware]}
    ]}
]}

where credentials is a tuple of username and password as either strings or binaries, port is a valid Unix port to listen on, and middleware is an optional list of middleware modules that will be applied to all admin API requests.

Summary

Types

Configuration parameters, see the module documentation for details.

Common state for all handlers

Types

config()

-type config() ::
          #{port := 0..65535, username := binary(), password := binary(), middleware => [module()]}.

Configuration parameters, see the module documentation for details.

handler_state()

-opaque handler_state()

Common state for all handlers

Functions

maybe_start()

-spec maybe_start() -> ok | {ok, pid()} | {error, any()}.