Skip to main content

ArtifactStore

Trait ArtifactStore 

Source
pub trait ArtifactStore:
    Send
    + Sync
    + 'static {
    // Required methods
    fn put_outputs(
        &self,
        workflow_id: &str,
        job_id: &str,
        outputs: HashMap<String, String>,
    ) -> impl Future<Output = Result<(), ArtifactError>> + Send;
    fn get_outputs(
        &self,
        workflow_id: &str,
        job_id: &str,
    ) -> impl Future<Output = Result<HashMap<String, String>, ArtifactError>> + Send;
    fn get_upstream_outputs(
        &self,
        workflow_id: &str,
        job_ids: &[String],
    ) -> impl Future<Output = Result<HashMap<String, HashMap<String, String>>, ArtifactError>> + Send;
}
Expand description

Pluggable artifact/output storage.

Jobs publish key-value outputs; downstream jobs read upstream outputs. Implementations: InMemoryArtifactStore, S3ArtifactStore, FsArtifactStore.

Required Methods§

Source

fn put_outputs( &self, workflow_id: &str, job_id: &str, outputs: HashMap<String, String>, ) -> impl Future<Output = Result<(), ArtifactError>> + Send

Store key-value outputs for a completed job.

Source

fn get_outputs( &self, workflow_id: &str, job_id: &str, ) -> impl Future<Output = Result<HashMap<String, String>, ArtifactError>> + Send

Retrieve outputs for a specific job.

Source

fn get_upstream_outputs( &self, workflow_id: &str, job_ids: &[String], ) -> impl Future<Output = Result<HashMap<String, HashMap<String, String>>, ArtifactError>> + Send

Retrieve outputs for multiple upstream jobs at once.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§