pubsub namespace Stay organized with collections Save and categorize content based on your preferences.
Functions
| Function | Description |
|---|---|
| schedule(schedule) | Registers a Cloud Function to run at specified times. |
| topic(topic) | Registers a Cloud Function triggered when a Google Cloud Pub/Sub message is sent to a specified topic. |
Classes
| Class | Description |
|---|---|
| Message | Interface representing a Google Cloud Pub/Sub message. |
| ScheduleBuilder | The builder for scheduled functions, which are powered by Google Pub/Sub and Cloud Scheduler. Describes the Cloud Scheduler job that is deployed to trigger a scheduled function at the provided frequency. For more information, see [Schedule functions](/docs/functions/schedule-functions).Access viafunctions.pubsub.schedule(). |
| TopicBuilder | The Google Cloud Pub/Sub topic builder.Access viafunctions.pubsub.topic(). |
pubsub.schedule()
Registers a Cloud Function to run at specified times.
Signature:
exportdeclarefunctionschedule(schedule:string):ScheduleBuilder;Parameters
| Parameter | Type | Description |
|---|---|---|
| schedule | string | The schedule, in Unix Crontab or AppEngine syntax. |
Returns:
ScheduleBuilder interface.
pubsub.topic()
Registers a Cloud Function triggered when a Google Cloud Pub/Sub message is sent to a specified topic.
Signature:
exportdeclarefunctiontopic(topic:string):TopicBuilder;Parameters
| Parameter | Type | Description |
|---|---|---|
| topic | string | The Pub/Sub topic to watch for message events. |
Returns:
Pub/Sub topic builder interface.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-04-24 UTC.