MCPcopy Create free account
hub / github.com/apache/maka / tryAcquireInteractiveRootReader

Function tryAcquireInteractiveRootReader

packages/storage/src/root-authority.ts:598–606  ·  view source on GitHub ↗
(
  capability: StorageRootCapability<'interactive'>,
)

Source from the content-addressed store, hash-verified

596}
597
598export async function tryAcquireInteractiveRootReader(
599 capability: StorageRootCapability<'interactive'>,
600): Promise<InteractiveRootReader | undefined> {
601 return withAuthorityFailure(
602 'lock_failed',
603 'Unable to acquire the interactive storage root reader lock',
604 () => acquireStateRootLock(capability, 'read'),
605 );
606}
607
608export async function assertStorageRootLease<
609 K extends StorageRootKind,

Calls 2

withAuthorityFailureFunction · 0.85
acquireStateRootLockFunction · 0.85

Tested by 1

acquireReaderFunction · 0.72