runlet v1.0.0 Runlet.Process

Process job control

Link to this section Summary

Functions

Add a command to a user's process table.

Tests if a PID is running.

Retrieve a formatted process table for a user.

Restart saved processes.

Delete a command from a user's process table.

Toggle formatting of events.

Terminate a process for a user.

Sets the number of events allowed in a period of time (minutes). Events exceeding this limit are dropped.

Find a running command by PID.

Force a process to exit.

Run saved processes for a user.

Return the list of running commands.

Starts a stopped process.

Restarts running processes.

Suppresses output for a process for the given number of minutes.

List available process tables.

List process entries for a user.

Link to this section Types

Link to this type

t()

t() :: {pid(), binary()}

Link to this section Functions

Link to this function

add(user, pid, cmd)

add(binary(), Runlet.PID.t(), binary()) :: :ok | {:error, any()}

Add a command to a user's process table.

Link to this function

alive?(pid)

alive?(pid()) :: boolean()

Tests if a PID is running.

Link to this function

all(name)

all(binary()) :: [binary()]

Retrieve a formatted process table for a user.

Link to this function

boot(stdout)

boot((... -> any())) :: [any()]

Restart saved processes.

Link to this function

delete(name, id)

delete(binary(), Runlet.PID.t()) :: :ok | {:error, any()}

Delete a command from a user's process table.

Link to this function

format(name, id)

format(binary(), Runlet.PID.t()) :: binary()

Toggle formatting of events.

Link to this function

kill(name, id)

kill(binary(), Runlet.PID.t()) :: binary()

Terminate a process for a user.

Link to this function

limit(name, id, count \\ 1, minutes \\ 1)

Sets the number of events allowed in a period of time (minutes). Events exceeding this limit are dropped.

Link to this function

lookup(name, id)

lookup(binary(), Runlet.PID.t()) :: [t()]

Find a running command by PID.

Link to this function

match(name, id, fun)

match(binary(), Runlet.PID.t(), (pid(), binary() -> binary())) :: binary()
Link to this function

pexit(name, id)

pexit(binary(), Runlet.PID.t()) :: binary()

Force a process to exit.

Link to this function

run(name, proc, stdout)

run(binary(), [t()], (... -> any())) :: [any()]

Run saved processes for a user.

Link to this function

running(name)

running(binary()) :: [binary()]

Return the list of running commands.

Link to this function

start(name, id)

start(binary(), Runlet.PID.t()) :: binary()

Starts a stopped process.

Link to this function

start_link(stdout)

Restarts running processes.

Link to this function

stop(name, id, minutes \\ 60)

Suppresses output for a process for the given number of minutes.

Link to this function

table()

table() :: [binary()]

List available process tables.

Link to this function

table(name)

table(binary()) :: [t()]

List process entries for a user.