DynamicSupervisor managing transaction sync workers.
Each access token gets its own supervised TransactionSync worker.
Workers are :transient — they restart on unexpected crashes but
stop cleanly when asked.
Workers are deduplicated by access token. Attempting to start a
second worker for the same access token returns {:error, :already_started}.
Summary
Functions
Returns a specification to start this module under a supervisor.
Returns a list of all running sync workers with their status.
Starts a sync worker. Returns {:error, :already_started} if one
exists for this access token.
Number of active sync workers.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec list_workers() :: [map()]
Returns a list of all running sync workers with their status.
@spec start_link(keyword()) :: Supervisor.on_start()
@spec start_worker(String.t(), PlaidEx.Config.t(), keyword()) :: {:ok, pid()} | {:error, :already_started | term()}
Starts a sync worker. Returns {:error, :already_started} if one
exists for this access token.
@spec worker_count() :: non_neg_integer()
Number of active sync workers.