View Source Tux.Exec behaviour (Tux v0.4.0)
Dispatcher subystem for invoking command modules, with optional rescuing from raised exceptions.
This module is injected in dispatcher at call site:
...
use Tux.Exec, overrideable: true
...
Of course, the injected exec/2
function can be overwritten in
your dispatchers:
defmodule MyDispatcher do
use Tux.Dispatcher
@impl true
def exec(env, exec_opts) do
... implement custom command module execution here
end
end
Summary
Types
Execution options for command module.
Callbacks
Invoke the command module according to the information in the env
and return the result, with optional recovery from exceptions.
Functions
Inject the exec/2
function.
Types
Callbacks
@callback exec(env(), exec_opts()) :: Tux.Result.t()
Invoke the command module according to the information in the env
and return the result, with optional recovery from exceptions.