Juggernaut.Server.Shell (Juggernaut v0.4.0)

Copy Markdown View Source

The Mix shell while mix juggernaut.server runs: what a task prints with Mix.shell/0 goes to the client whose job runs in the calling process (sink/1), so an attached run prints exactly what a standalone one does. Outside a job it is the shell that was in place when the server started (install/0), usually Mix.Shell.IO.

Summary

Functions

Makes this the Mix shell, keeping the current one for output outside jobs.

Sends what this process prints through the shell to pid as {:out, device, text}.

Puts back the shell install/0 found.

Functions

install()

@spec install() :: :ok

Makes this the Mix shell, keeping the current one for output outside jobs.

sink(pid)

@spec sink(pid() | nil) :: term()

Sends what this process prints through the shell to pid as {:out, device, text}.

uninstall()

@spec uninstall() :: :ok

Puts back the shell install/0 found.