bot_ex v0.2.0 BotEx.Routing.Handler

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Apply middleware modules to messages

Apply middleware to incoming messages and routing them to handlers

Callback implementation for GenServer.init/1.

Link to this section Functions

Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

handle(list, type)

handle(any(), any()) :: :ok

Apply middleware modules to messages

Link to this function

handle_cast(msg, state)

handle_cast({atom(), list()}, any()) :: {:noreply, any()}

Apply middleware to incoming messages and routing them to handlers

Parameters

  • {key, list}: key - atom with bot type key, list - list incoming BotEx.Models.Message messages
  • state: current state
Link to this function

init(args)

init(any()) :: {:ok, []}

Callback implementation for GenServer.init/1.