import { __export } from "../../_virtual/rolldown_runtime.mjs"; import { initV2Endpoint } from "../../runtime/manifest.mjs"; import { copyIfPresent } from "../../common/encoding.mjs"; import { withInit } from "../../common/onInit.mjs"; import { wrapTraceContext } from "../trace.mjs"; import { getGlobalOptions, optionsToEndpoint, optionsToTriggerAnnotations } from "../options.mjs"; import { patchV1Compat } from "../compat.mjs"; //#region src/v2/providers/pubsub.ts var pubsub_exports = /* @__PURE__ */ __export({ Message: () => Message, onMessagePublished: () => onMessagePublished }); /** * Google Cloud Pub/Sub is a globally distributed message bus that automatically scales as you need it. * You can create a function ({@link onMessagePublished}) that handles pub/sub events by using functions.pubsub. * * This function triggers whenever a new pub/sub message is sent to a specific topic. * You must specify the Pub/Sub topic name that you want to trigger your function, and set the event within the * onPublish() event handler. * * PubSub Topic: *