Function brane_cli::run::initialize_instance_vm

source ·
pub async fn initialize_instance_vm(
    api_endpoint: impl AsRef<str>,
    drv_endpoint: impl AsRef<str>,
    user: Option<String>,
    attach: Option<AppId>,
    options: ParserOptions,
) -> Result<InstanceVmState<Stdout, Stderr>, Error>
Expand description

Function that prepares a remote, instance-backed virtual machine by initializing the proper indices and whatnot.

§Arguments

  • api_endpoint: The brane-api endpoint that we download indices from.
  • drv_endpoint: The brane-drv endpoint that we will connect to to run stuff.
  • user: If given, then this is some tentative identifier of the user receiving the final workflow result.
  • attach: If given, we will try to attach to a session with that ID. Otherwise, we start a new session.
  • options: The ParserOptions that describe how to parse the given source.

§Returns

The newly created virtual machine together with associated states as an InstanceVmState.

§Errors

This function errors if we failed to get the new package indices or other information.