1import * as pubsub from "@distilled.cloud/gcp/pubsub_v1";
2import * as Layer from "effect/Layer";
3import { makeSubscriptionHttpBinding } from "./BindingHttp.ts";
4import { Pull } from "./Pull.ts";
5
6/**
7 * HTTP implementation of {@link Pull}.
8 *
9 * @layer
10 * @provides GCP.PubSub.Pull
11 */
12export 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);