Current section
Files
Jump to
Current section
Files
lib/island.ex
defmodule Island do
use Application
@type spec() :: module() | {module(), args :: term()}
@impl Application
def start(_type, _args) do
children = [
Island.ProcessCoordinator.child_spec([]),
Island.Supervisor.child_spec([]),
Island.NodeServer.child_spec([])
]
options = [
strategy: :one_for_all,
name: IslandSupervisor
]
Supervisor.start_link(children, options)
end
@spec register(spec()) :: :ok | {:error, term()}
defdelegate register(spec), to: Island.ProcessCoordinator
@spec deregister(spec()) :: :ok | {:error, term()}
defdelegate deregister(spec), to: Island.ProcessCoordinator
end