Eai.PTY.Supervisor (eai v1.0.2)

Copy Markdown

DynamicSupervisor that owns all Eai.PTY.Session processes.

Each PTY session is a :transient child — restarted on abnormal exit, not on :normal / :shutdown. Session creation is driven by

Graph

<<{Eai.Naming, required_by, Eai.PTY.Supervisor}. <<{Eai.PTY.Registry, required_by, Eai.PTY.Supervisor}. <<{Eai.PTY.Supervisor, required_by, Eai.PTY}. <<{Eai.PTY.Supervisor, required_by, Eai.Application}. <<{Eai.PTY.Session, spawned_by, Eai.PTY.Supervisor}.

Summary

Functions

Returns a specification to start this module under a supervisor.

Start a new PTY.Session for pty_session_id under this supervisor.

Terminate the session for pty_session_id, if running.

Functions

child_spec(arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts)

start_session(pty_session_id)

@spec start_session(String.t()) :: {:ok, pid()} | {:error, term()}

Start a new PTY.Session for pty_session_id under this supervisor.

stop_session(pty_session_id)

@spec stop_session(String.t()) :: :ok | {:error, :not_found}

Terminate the session for pty_session_id, if running.