agala v1.0.2 Agala.Router.Direct
Direct router creates single handler process and pass all incoming messages to it.
It’s the simplest case. It also supervises handler process:
if it falls - router will ensure to restart it before passing new incomming messages.
To use this router, put in your configuration:
# config.exs
router: Agala.Router.Direct
or don’t put anything, because this router goes by default.
Summary
Functions
This function initialises Supervisor tree, and is callback
implementation for Supervisor.init/1 function
This function routes the message to defined Agala.Handler implementor
Types
Functions
This function initialises Supervisor tree, and is callback
implementation for Supervisor.init/1 function.
Unlikely you need to call this function manualy.
This function routes the message to defined Agala.Handler implementor.
message/0 is an instance of single message, which can be used to define,
what handler should be used in this direct case of routing. In this module,
Agala.Model.Message.t/0 is simply passed to the handler