Parameters Specification

Specify where to get the value for each item's input.

The value may not necessarily exist until the flow is executed.

%3cluster_acluster_a_paramscluster_bcluster_b_paramscluster_ccluster_c_paramsaaa_state .. bba->ba_text📥filedownloada_params_srcsrca_params_destdestc_params_file_pathfile_pathb_stateS3BucketState  nameccb->cb_text🪣s3bucketb_params_namenamec_params_bucket_namebucket_nameb_state->c_params_bucket_namec_state .. c_text📤s3objectc_params_object_keyobject_keyweb_app_urlweb_app_urlweb_app_url->a_params_srcweb_app_pathweb_app_pathweb_app_path->a_params_destweb_app_path->c_params_file_pathbucket_namebucket_namebucket_name->b_params_nameobject_keyobject_keyobject_key->c_params_object_key

let app_download_params = FileDownloadParams::<WebApp> {
    src: Url::parse("https://example.com/web_app.tar")?,
    dest: PathBuf::from("/tmp/path/to/web_app.tar"),
    marker: PhantomData,
};

let s3_bucket_params = S3BucketParams::<WebApp>::new(bucket_name);

let s3_object_params = S3ObjectParams::<WebApp> {
    file_path: PathBuf::from("/tmp/path/to/web_app.tar"),
    object_key: String::from("web_app.tar"),
    bucket_name: !?, /* Somehow get the bucket name from `b` */
};

Deferred Values

// examples/envman/src/flows/app_upload_flow.rs
let s3_object_params_spec = S3ObjectParams::<WebApp>::field_wise_spec()
    .with_file_path(PathBuf::from("/tmp/path/to/web_app.tar"))
    .with_object_key(String::from("web_app.tar"))
    .with_bucket_name_from_map(|s3_bucket_state: &S3BucketState| {
        match s3_bucket_state {
            S3BucketState::None => None,
            S3BucketState::Some {
                name,
                creation_date: _,
            } => Some(name.clone()), // type safe!
        }
    })
    .build();

let file_download_params_spec = file_download_params.into();
let server_instance_params_spec = server_instance_params.into();