Raxol.Core.Runtime.Plugins.CommandHelper (Raxol v0.2.0)
View SourceHandles plugin command registration and dispatch for the Plugin Manager.
Summary
Functions
Finds the plugin responsible for handling a command.
Handles the dispatching of a command to the appropriate plugin.
Registers the commands exposed by a plugin.
Unregisters all commands associated with a specific plugin module.
Functions
Finds the plugin responsible for handling a command.
Uses the CommandRegistry to look up the command by name and optional namespace.
Returns {:ok, module, function, arity} | :not_found
.
Handles the dispatching of a command to the appropriate plugin.
This function is called by the Manager's handle_cast
.
It finds the plugin, calls its command handler, and returns an updated
plugin state map or an error indicator.
Returns {:ok, updated_plugin_states_map} | :not_found | {:error, reason}
.
Replies are sent directly via send/2
within this function.
Registers the commands exposed by a plugin.
Calls the plugin's get_commands/1
or get_commands/0
callback
and registers them in the command table.
Unregisters all commands associated with a specific plugin module.