Xirsys.Sockets.Pipeline.Tier (xturn_sockets v2.2.0)

View Source

One 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
nil

Summary

Types

t()

Runtime tier record.

Types

t()

@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.

  • accumulator / accumulator_opts - framing module and its init/1 opts
  • handler - Xirsys.Sockets.Handler implementation
  • dispatch - :inline (same process), :task, or :pool
  • pool_size - max pool children when dispatch: :pool (nil uses config)
  • task_supervisor / pool_supervisor - named DynamicSupervisors