The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | import * as Layer from "effect/Layer"; |
| 2 | import { QueueSinkFromWriteQueue } from "./QueueSinkBatch.ts"; |
| 3 | import { WriteQueueHttp } from "./WriteQueueHttp.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Implementation of the {@link QueueSink} service over the Queues bulk-push |
| 7 | * HTTP API ({@link WriteQueueHttp}), authenticated with a scoped |
| 8 | * `Queues Write` API token bound into the host. |
| 9 | * ### Providing the Layer |
| 10 | * **Example:** Drain a Stream over HTTP |
| 11 | * ```typescript |
| 12 | * Effect.gen(function* () { |
| 13 | * const sink = yield* Cloudflare.Queues.QueueSink(Clicks); |
| 14 | * // ... |
| 15 | * }).pipe(Effect.provide(Cloudflare.Queues.QueueSinkHttp)); |
| 16 | * ``` |
| 17 | * |
| 18 | * @layer |
| 19 | * @provides Cloudflare.Queues.QueueSink |
| 20 | * @product Queues |
| 21 | * @category Storage & Databases |
| 22 | */ |
| 23 | export const QueueSinkHttp = QueueSinkFromWriteQueue.pipe(Layer.provide(WriteQueueHttp)); |