(
client: AtomicClient,
)
| 213 | static SANDBOX_TOKEN: std::sync::OnceLock<Vec<u8>> = std::sync::OnceLock::new(); |
| 214 | |
| 215 | fn 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. |
no test coverage detected