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