MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / workflow_snapshot

Function workflow_snapshot

atomic-cli/src/commands/rpc.rs:7106–7116  ·  view source on GitHub ↗

Fetch the asserted graph through the same service for local and reactor modes. The CLI adapts this immutable snapshot to RDF without opening redb.

(
    root: &Path,
)

Source from the content-addressed store, hash-verified

7104/// Fetch the asserted graph through the same service for local and reactor
7105/// modes. The CLI adapts this immutable snapshot to RDF without opening redb.
7106pub(crate) fn workflow_snapshot(
7107 root: &Path,
7108) -> CliResult<atomic_repository::repository::WorkflowSnapshot> {
7109 let session = Service::open_root(root)?.ok_or_else(|| CliError::InvalidArgument {
7110 message: "workflow validation requires a local repository service".into(),
7111 })?;
7112 let response = session.get_workflow_snapshot(pb::GetWorkflowSnapshotRequest {
7113 repository: Some(session.reference.clone()),
7114 })?;
7115 decode_workflow_snapshot(response)
7116}
7117
7118fn decode_workflow_snapshot(
7119 response: pb::GetWorkflowSnapshotResponse,

Callers 1

runMethod · 0.85

Calls 3

decode_workflow_snapshotFunction · 0.85
get_workflow_snapshotMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected