| 1 | import * as pubsublite from "@distilled.cloud/gcp/pubsublite_v1"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makeSubscriptionHttpBinding } from "./BindingHttp.ts"; |
| 4 | import { CommitCursor } from "./CommitCursor.ts"; |
| 5 | |
| 6 | /** |
| 7 | * HTTP implementation of {@link CommitCursor}. |
| 8 | * |
| 9 | * @layer |
| 10 | * @provides GCP.PubSubLite.CommitCursor |
| 11 | */ |
| 12 | export const CommitCursorHttp = Layer.effect( |
| 13 | CommitCursor, |
| 14 | makeSubscriptionHttpBinding({ |
| 15 | tag: "GCP.PubSubLite.CommitCursor", |
| 16 | iam: { role: "roles/pubsublite.subscriber" }, |
| 17 | field: "subscription", |
| 18 | operation: pubsublite.commitCursorCursorProjectsLocationsSubscriptions, |
| 19 | }), |
| 20 | ); |