Function brane_tsk::docker::preprocess_args

source ·
pub async fn preprocess_args(
    args: &mut HashMap<String, FullValue>,
    input: &HashMap<DataName, AccessKind>,
    result: &Option<String>,
    data_dir: Option<impl AsRef<Path>>,
    results_dir: impl AsRef<Path>,
) -> Result<Vec<VolumeBind>, ExecuteError>
Expand description

Helps any VM aiming to use Docker by preprocessing the given list of arguments and function result into a list of bindings (and resolving the the arguments while at it).

§Arguments

  • args: The arguments to resolve / generate bindings for.
  • input: A list of input datasets & intermediate results to the current task.
  • result: The result to also generate a binding for if it is present.
  • data_dir: The directory where all real datasets live.
  • results_dir: The directory where all temporary results are/will be stored.

§Returns

A list of VolumeBindings that define which folders have to be mounted to the container how.

§Errors

This function errors if datasets / results are unknown to us.