SuperWorker.Supervisor.Chain.Messaging (SuperWorker v0.3.6)
View SourceHandles message passing and data flow within a worker chain.
This module is responsible for sending data to the correct worker(s) based on the chain's configuration (e.g., send type, order) and invoking the finished callback when data completes its journey through the chain.
Summary
Functions
Injects new data into the beginning of the chain.
Sends data to the next worker(s) in the chain based on the current order.
Functions
@spec new_data(SuperWorker.Supervisor.Chain.t(), SuperWorker.Supervisor.Message.t()) :: :ok
Injects new data into the beginning of the chain.
@spec send_next( SuperWorker.Supervisor.Chain.t(), non_neg_integer(), SuperWorker.Supervisor.Message.t() ) :: {:ok, atom()} | {:error, atom()}
Sends data to the next worker(s) in the chain based on the current order.