MCPcopy Create free account
hub / github.com/callstack/agent-device / composeLeaseProvider

Function composeLeaseProvider

src/provider-device-runtime.ts:187–199  ·  view source on GitHub ↗
(
  runtimes: ProviderDeviceRuntime[],
)

Source from the content-addressed store, hash-verified

185}
186
187function composeLeaseProvider(
188 runtimes: ProviderDeviceRuntime[],
189): LeaseLifecycleProvider | undefined {
190 if (runtimes.length === 0) return undefined;
191 return {
192 allocate: async (lease, context) =>
193 await firstProviderResult(runtimes, 'allocate', lease, context),
194 heartbeat: async (lease, context) =>
195 await firstProviderResult(runtimes, 'heartbeat', lease, context),
196 release: async (lease, context) =>
197 await firstProviderResult(runtimes, 'release', lease, context),
198 };
199}
200
201function composeCloudArtifactProvider(
202 runtimes: ProviderDeviceRuntime[],

Calls 1

firstProviderResultFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…