(prefix: string)
| 345 | const machineIdCounterDocId = cosmosId("machine-id-counter") |
| 346 | |
| 347 | const createContainer = (prefix: string) => |
| 348 | Effect.fnUntraced(function*() { |
| 349 | const { db } = yield* CosmosClient |
| 350 | const containerId = `${prefix}cluster` |
| 351 | yield* Effect |
| 352 | .tryPromise(() => |
| 353 | db.containers.create({ |
| 354 | id: containerId, |
| 355 | partitionKey: { paths: ["/_partitionKey"], version: 2 } |
| 356 | }) |
| 357 | ) |
| 358 | .pipe(Effect.catchIf(isConflict, () => Effect.void)) |
| 359 | return db.container(containerId) |
| 360 | }) |
| 361 | |
| 362 | export const makeMessageStorage = Effect.fnUntraced(function*(options?: { |
| 363 | readonly prefix?: string | undefined |
no test coverage detected
searching dependent graphs…