Packages

PhoenixLiveState enables LiveView processes to share reactive state across a cluster of nodes. Attach LiveViews to a state server and get automatic assign synchronization.

Current section

Files

Jump to
phoenix_live_state lib phoenix_live_state supervisor.ex
Raw

lib/phoenix_live_state/supervisor.ex

defmodule PhoenixLiveState.Supervisor do
@moduledoc """
A `DynamicSupervisor` used to supervise all state servers.
"""
@moduledoc since: "0.1.0"
use DynamicSupervisor
@doc false
def start_link(init_arg) do
DynamicSupervisor.start_link(__MODULE__, init_arg, name: __MODULE__)
end
@doc false
@impl true
def init(_init_arg) do
DynamicSupervisor.init(strategy: :one_for_one)
end
end