Created
September 19, 2021 19:10
-
-
Save kabergstrom/8faa39689cdff60c95a53cf0e7ac88a8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
impl ImportOp { | |
pub async fn fetch_kv(path: &Path, key: &str) -> Result<Vec<u8>> { | |
// like fetch_import_artifacts, except it fetches arbitrary key-value data | |
} | |
/// Store data with a named key | |
pub async fn store_kv(key: &str, data: Vec<u8>) {} | |
pub async fn fetch_import_artifact( | |
path: &IndirectIdentifer, | |
) -> Result<(ArtifactMetadata, Vec<u8>)> { | |
// IF this ImportOp is from a batch which contains the requested path, | |
// then block until the import processing loop has processed the target path, | |
// and use the metadata+artifact from the `metadata_changes` HashMap | |
// Otherwise, fetch metadata+artifact from database/regenerate it, similar to AssetHubService::get_import_artifacts. | |
// Record the path in the path_refs reverse index. | |
// Remove path refs that have been registered in a previous run, but are no longer being fetched. | |
// Detect cyclic dependencies? | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment