Background process management for a sandbox.
Wraps:
POST /sandboxes/:id/processes— start/4GET /sandboxes/:id/processes— list/2DELETE /sandboxes/:id/processes/:pid— kill/3POST /sandboxes/:id/processes/:pid/stdin— send_stdin/4
Summary
Functions
Kill a background process by its PID
(DELETE /sandboxes/:sandbox_id/processes/:pid).
List all running background processes in the sandbox
(GET /sandboxes/:sandbox_id/processes).
Send data to the stdin of a running background process
(POST /sandboxes/:sandbox_id/processes/:pid/stdin).
Start a background process in the sandbox
(POST /sandboxes/:sandbox_id/processes).
Functions
@spec kill(Miosa.Client.t(), String.t(), String.t()) :: :ok | {:error, Miosa.Error.t()}
Kill a background process by its PID
(DELETE /sandboxes/:sandbox_id/processes/:pid).
@spec list(Miosa.Client.t(), String.t()) :: Miosa.Client.result(list())
List all running background processes in the sandbox
(GET /sandboxes/:sandbox_id/processes).
@spec send_stdin(Miosa.Client.t(), String.t(), String.t(), String.t()) :: Miosa.Client.result(map())
Send data to the stdin of a running background process
(POST /sandboxes/:sandbox_id/processes/:pid/stdin).
@spec start(Miosa.Client.t(), String.t(), String.t(), map()) :: Miosa.Client.result(map())
Start a background process in the sandbox
(POST /sandboxes/:sandbox_id/processes).
Options map keys
"cwd"— Working directory for the process."env"— Environment variables map."timeout"— Process timeout in seconds.