Function brane_cli::run::run_instance_vm
source · pub async fn run_instance_vm(
drv_endpoint: impl AsRef<str>,
state: &mut InstanceVmState<Stdout, Stderr>,
what: impl AsRef<str>,
snippet: impl AsRef<str>,
profile: bool,
) -> Result<FullValue, Error>
Expand description
Function that executes the given workflow snippet to completion on the Brane instance, returning the result it returns.
§Arguments
drv_endpoint
: Thebrane-drv
endpoint that we will connect to to run stuff (used for debugging only).state
: The InstanceVmState that we use to connect to the driver.what
: The thing we’re running. Either a filename, or something like stdin.snippet
: The snippet (as raw text) to compile and run.profile
: If given, prints the profile timings to stdout if reported by the remote.
§Returns
The FullValue that the workflow returned, if any. If there was no value, returns FullValue::Void instead.
§Errors
This function errors if we failed to compile the workflow, communicate with the remote driver or remote execution failed somehow.