PeerNet.Connection.Supervisor (PeerNet v0.1.0)

Copy Markdown View Source

DynamicSupervisor for live PeerNet.Connection processes.

One supervisor per PeerNet instance. Connections come and go as peers appear and disappear; the supervisor enforces process isolation (one misbehaving connection cannot bring down another) and provides a clean shutdown surface.

Summary

Functions

Returns a specification to start this module under a supervisor.

Start a PeerNet.Connection under this supervisor.

Functions

child_spec(arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_connection(server, opts)

@spec start_connection(
  GenServer.server(),
  keyword()
) :: DynamicSupervisor.on_start_child()

Start a PeerNet.Connection under this supervisor.

start_link(opts)