Jido. Signal. Names
(Jido Signal v2.2.0)
View Source
Resolves process names based on optional jido: instance scoping.
When jido: option is present, routes all operations through instance-scoped
supervisors. When absent, uses global defaults for zero-config operation.
Instance Isolation
The jido: option enables complete isolation between instances:
- Each instance has its own Registry, TaskSupervisor, and Bus processes
- No cross-instance signal leakage
- Easy to test isolation guarantees
Examples
# Global (default) - uses Jido.Signal.Registry
Names.registry([])
#=> Jido.Signal.Registry
# Instance-scoped - uses MyApp.Jido.Signal.Registry
Names.registry(jido: MyApp.Jido)
#=> MyApp.Jido.Signal.Registry
Summary
Functions
Returns the Extension Registry name for the given instance scope.
Extracts the jido instance from options, returning nil if not present.
Returns the Registry name for the given instance scope.
Resolves a module name based on instance scope.
Returns the Supervisor name for the given instance scope.
Returns the TaskSupervisor name for the given instance scope.
Types
@type opts() :: keyword()
Functions
Returns the Extension Registry name for the given instance scope.
Examples
iex> Jido.Signal.Names.ext_registry([])
Jido.Signal.Ext.Registry
iex> Jido.Signal.Names.ext_registry(jido: MyApp.Jido)
MyApp.Jido.Signal.Ext.Registry
Extracts the jido instance from options, returning nil if not present.
Returns the Registry name for the given instance scope.
Examples
iex> Jido.Signal.Names.registry([])
Jido.Signal.Registry
iex> Jido.Signal.Names.registry(jido: MyApp.Jido)
MyApp.Jido.Signal.Registry
Resolves a module name based on instance scope.
When jido: option is nil or not present, returns the default module.
When jido: option is present, concatenates the instance with
the default module's relative path under Jido.Signal.
Examples
iex> Jido.Signal.Names.scoped([], Jido.Signal.Registry)
Jido.Signal.Registry
iex> Jido.Signal.Names.scoped([jido: MyApp.Jido], Jido.Signal.Registry)
MyApp.Jido.Signal.Registry
Returns the Supervisor name for the given instance scope.
Examples
iex> Jido.Signal.Names.supervisor([])
Jido.Signal.Supervisor
iex> Jido.Signal.Names.supervisor(jido: MyApp.Jido)
MyApp.Jido.Signal.Supervisor
Returns the TaskSupervisor name for the given instance scope.
Examples
iex> Jido.Signal.Names.task_supervisor([])
Jido.Signal.TaskSupervisor
iex> Jido.Signal.Names.task_supervisor(jido: MyApp.Jido)
MyApp.Jido.Signal.TaskSupervisor