Dynamic supervisor for channel instances.
Manages the lifecycle of channel instances (e.g., Telegram bots, Discord connections). Each instance is its own supervisor tree containing:
- InstanceServer (lifecycle state machine)
- Channel-specific processes (Poller, Sender, etc.)
Summary
Functions
Returns a specification to start this module under a supervisor.
Count running instances.
Get the status of an instance.
Get health snapshots for all running instances.
List all running instances.
Start a new instance.
Start the instance supervision tree (called by DynamicSupervisor).
Stop an instance by ID.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec count_instances(module()) :: non_neg_integer()
Count running instances.
Get the status of an instance.
Get health snapshots for all running instances.
Returns a list of health snapshot maps for each instance.
List all running instances.
@spec start_instance(module(), atom(), map()) :: {:ok, Jido.Messaging.Instance.t()} | {:error, term()}
Start a new instance.
Returns {:ok, instance} with the created Instance struct, or {:error, reason}.
Start the instance supervision tree (called by DynamicSupervisor).
Stop an instance by ID.