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

Function provenance_client

atomic-cli/src/commands/agent/provenance_rpc.rs:215–225  ·  view source on GitHub ↗
(
    client: AtomicClient,
)

Source from the content-addressed store, hash-verified

213static SANDBOX_TOKEN: std::sync::OnceLock<Vec<u8>> = std::sync::OnceLock::new();
214
215fn provenance_client(
216 client: AtomicClient,
217) -> pb::provenance_service_client::ProvenanceServiceClient<crate::remote_sandbox::SandboxChannel> {
218 let channel = tonic::service::interceptor::InterceptedService::new(
219 client.channel.clone(),
220 crate::remote_sandbox::TokenInterceptor::new(SANDBOX_TOKEN.get().map(Vec::as_slice)),
221 );
222 pb::provenance_service_client::ProvenanceServiceClient::new(channel)
223 .max_decoding_message_size(MAX_MESSAGE_BYTES)
224 .max_encoding_message_size(MAX_MESSAGE_BYTES)
225}
226
227/// Connect for one journal request: start the transport when it is down
228/// (D4) — except for a remote sandbox, which has none of its own.

Callers 8

reserve_turnMethod · 0.85
appendMethod · 0.85
prepare_checkpointMethod · 0.85
load_frozen_envelopesMethod · 0.85
bind_checkpoint_hashMethod · 0.85
turn_statusMethod · 0.85
update_turnFunction · 0.85

Calls 2

getMethod · 0.65
cloneMethod · 0.45

Tested by

no test coverage detected