Skip to content

Commit ad144e4

Browse files
authored
Update ref docs for handler SDK to include scheduled functions. (firebase#731)
1 parent ab3ae2a commit ad144e4

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/handler-builder.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,13 +305,20 @@ export class HandlerBuilder {
305305

306306
/**
307307
* Create a handler for Cloud Pub/Sub events.
308-
309-
* `pubsub.onPublish` handles the publication of messages to a topic.
310-
308+
*
309+
* `topic.onPublish` handles messages published to a Pub/Sub topic from SDKs, Cloud Console, or gcloud CLI.
310+
*
311311
* @example
312312
* ```javascript
313313
* exports.myFunction = functions.handler.pubsub.topic.onPublish((message) => { ... })
314314
* ```
315+
316+
* `schedule.onPublish` handles messages published to a Pub/Sub topic on a schedule.
317+
*
318+
* @example
319+
* ```javascript
320+
* exports.myFunction = functions.handler.pubsub.schedule.onPublish((message) => { ... })
321+
* ```
315322
*/
316323
get pubsub() {
317324
return {

0 commit comments

Comments
 (0)