View Source Runbox.Slave (runbox v17.1.0)

Utilities for starting a slave node with a scenario release and communicating with the node.

Summary

Functions

Calls a function on the slave.

Starts a slave node.

Spawns a slave and executes the fun.

Functions

@spec call(node(), module(), atom(), list()) :: term()

Calls a function on the slave.

Calls MFA on the slave. See :erpc.call/4 for details.

Link to this function

start(release_dir, app_env \\ [])

View Source
@spec start(String.t(), [
  {Application.app(), [{Application.key(), Application.value()}]}
]) ::
  {:ok, pid(), node()} | {:error, term()}

Starts a slave node.

The release_dir is a directory with scenario release.

If app_env is set, given app environment variables are set on slave.

Link to this function

with_slave(release_dir, fun)

View Source
@spec with_slave(String.t(), (node() -> result)) :: {:ok, result} | {:error, term()}
when result: any()

Spawns a slave and executes the fun.

fun receives the slave node as a parameter. The slave is terminated after the fun finishes.