Xirsys.Sockets.Pipeline.Tier (xturn_sockets v2.2.1)
View SourceOne compiled pipeline tier: accumulator, handler, and dispatch strategy.
iex> tier = %Xirsys.Sockets.Pipeline.Tier{
...> accumulator: Xirsys.Sockets.Accumulator.Raw,
...> accumulator_opts: [],
...> handler: :my_handler
...> }
iex> tier.dispatch
:inline
iex> tier.pool_size
nilWhat problem this solves
Each pipeline layer needs a frozen snapshot of which accumulator module,
handler module, and dispatch strategy (:inline, :task, or :pool) the
engine will use at runtime. %Tier{} is that snapshot after compile-time
tier/2 expansion.
RFCs
No STUN/TURN RFC; framing/dispatch infrastructure for XTurn listeners.
Summary
Types
@type t() :: %Xirsys.Sockets.Pipeline.Tier{ accumulator: module(), accumulator_opts: keyword(), dispatch: :inline | :task | :pool, handler: module(), pool_size: pos_integer() | nil, pool_supervisor: atom(), task_supervisor: atom() }
Runtime tier record produced by Pipeline.tier/2.
Fields
:accumulator-Xirsys.Sockets.Accumulatormodule for this tier:accumulator_opts- keyword list passed toaccumulator.init/1:handler-Xirsys.Sockets.Handlerimplementation module:dispatch-:inline(same process),:task, or:pool:pool_size- max pool children whendispatch: :pool;niluses config:task_supervisor- named supervisor fordispatch: :task:pool_supervisor- named supervisor fordispatch: :pool