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

Method resolve

libatomic/src/daemon/sandbox_grants.rs:429–440  ·  view source on GitHub ↗
(&self, token: &[u8])

Source from the content-addressed store, hash-verified

427 }
428
429 fn resolve(&self, token: &[u8]) -> Result<SandboxGrant, GrantError> {
430 let now = (self.clock)();
431 let registry = self.lock();
432 let grant = registry
433 .grants
434 .get(&digest(token))
435 .ok_or(GrantError::Unknown)?;
436 if !grant.is_live_at(now) {
437 return Err(GrantError::Expired(grant.expires));
438 }
439 Ok(grant.clone())
440 }
441
442 fn claim_session(
443 &self,

Callers 2

revalidateMethod · 0.45
sandbox_callerMethod · 0.45

Calls 5

lockMethod · 0.80
is_live_atMethod · 0.80
digestFunction · 0.70
getMethod · 0.65
cloneMethod · 0.45

Tested by

no test coverage detected