Raxol.Core.Runtime.Plugins.PluginCommandRegistry.Behaviour behaviour (Raxol v0.3.0)
View SourceDefines the behaviour for plugin command registration.
This behaviour is responsible for:
- Registering plugin commands
- Managing command lookups
- Handling command unregistration
- Maintaining command metadata
Summary
Callbacks
Looks up the handler for a command name and namespace.
Creates a new command registry table. Returns the name of the created table.
Registers a command provided by a plugin.
Unregisters a command.
Unregisters all commands associated with a specific module.
Types
Callbacks
@callback lookup_command( table_name(), namespace(), command_name() ) :: {:ok, command_entry()} | {:error, :not_found}
Looks up the handler for a command name and namespace.
@callback new() :: table_name()
Creates a new command registry table. Returns the name of the created table.
@callback register_command( table_name(), namespace(), command_name(), module(), atom(), integer() | nil ) :: :ok | {:error, :already_registered}
Registers a command provided by a plugin.
@callback unregister_command( table_name(), namespace(), command_name() ) :: :ok
Unregisters a command.
@callback unregister_commands_by_module( table_name(), module() ) :: :ok
Unregisters all commands associated with a specific module.