E2B.Team reference
ReadTeam
Section titled “ReadTeam”Source:
packages/e2b/src/ReadTeam.ts
Read the team’s sandbox usage and lifecycle event log: dashboards, quotas, auditing which sandboxes started, paused and were killed.
To react to lifecycle events as they happen, use E2B.SandboxEvents.
ReadTeam: Reading usage
Section titled “ReadTeam: Reading usage”const team = yield* E2B.ReadTeam();// in fetch:const now = Math.floor(Date.now() / 1000);const metrics = yield* team.metrics({ start: now - 3600, end: now });ReadTeamHttp
Section titled “ReadTeamHttp”Source:
packages/e2b/src/ReadTeamHttp.tsKind: Layer · Provides:E2B.ReadTeam
HTTP implementation of ReadTeam. Works on any host.
ReadTeamHttp: Provide the layer
Section titled “ReadTeamHttp: Provide the layer”Effect.gen(function* () { const team = yield* E2B.ReadTeam(); // ...}).pipe(Effect.provide(E2B.ReadTeamHttp))