View Source Runbox.Slave (runbox v22.0.0)
Utilities for starting a slave node with a scenario release and communicating with the node.
Summary
Functions
Calls a function on the slave.
Calls MFA on the slave. See :erpc.call/4 for details.
@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.
@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.