alice v0.2.3 Alice.Router
Handles the routing of messages for Alice
Summary
Functions
Returns a list of the currently registered handlers
Used internally to match command handlers
Used internally to match route handlers
Registers a handler. Returns :ok
Starts a Alice.Router process linked to the current process
Functions
Returns a list of the currently registered handlers.
If you started the router with default options, then you don’t have to pass
in a pid. (It will use the default registered name Alice.Router
.
Starts a Alice.Router process linked to the current process.
Note that a process started with start_link/2
is linked to the parent
process and will exit in case of crashes.
Options
You can pass in a list of handlers to be registered immediately upon starting the Router process.
For other options, see GenServer.start_link/3
. Default is to register the
process with the name Alice.Router
.
Return values
If the router is successfully created and initialized, the function returns
{:ok, pid}
, where pid
is the pid of the router.