camarero v0.4.1 Camarero.Catering View Source
The DynamicSupervisor to manage all the handlers.
Handlers might be added through config.exs file statically or
via call to route!/1 dynamically. The latter accepts all types of child_spec
acceptable by DynamicSupervisor.start_child/2.
This module is started in the application supervision tree and keeps track on all the handlers.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor
Declares and stores the new route. If the route is already set, logs an error message to the log and acts as NOOP
Starts the DynamicSupervisor and Camarero.Catering.Routes,
linked to the current process
Link to this section Functions
child_spec(arg) View Source
Returns a specification to start this module under a supervisor.
See Supervisor.
route!(child_spec)
View Source
route!(Supervisor.child_spec() | {module(), term()} | module()) :: State.t()
route!(Supervisor.child_spec() | {module(), term()} | module()) :: State.t()
Declares and stores the new route. If the route is already set, logs an error message to the log and acts as NOOP.
start_link(extra_arguments \\ []) View Source
Starts the DynamicSupervisor and Camarero.Catering.Routes,
linked to the current process.
Upon start, loads :camarero, :carta config setting and adds routes for all
the statically configured handlers.