Skip to content

Commit 2e97603

Browse files
authored
Updated PubSub docs, removing unused types + top-level comments (#1117)
* Updated PubSub docs, removing unused types and included top-level comments
1 parent 92aa571 commit 2e97603

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

src/v2/providers/pubsub.ts

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,25 @@ import { CloudEvent, CloudFunction } from '../core';
44
import * as options from '../options';
55

66
/**
7-
* A PubSub Topic is:
7+
* Google Cloud Pub/Sub is a globally distributed message bus that automatically scales as you need it.
8+
* You can create a function ({@link onMessagePublished}) that handles pub/sub events by using functions.pubsub.
9+
*
10+
* This function triggers whenever a new pub/sub message is sent to a specific topic.
11+
* You must specify the Pub/Sub topic name that you want to trigger your function, and set the event within the
12+
* onPublish() event handler.
13+
*
14+
* PubSub Topic:
815
* <ul>
916
* <li>A resource that you can publish messages to and then consume those messages via subscriptions.
10-
* <li>An isolated data stream for Pub/Sub messages.
17+
* <li>An isolated data stream for pub/sub messages.
1118
* <li>Messages are published to a topic.
1219
* <li>Messages are listened to via a subscription.
1320
* <li>Each subscription listens to the messages published to exactly one topic.
21+
*
22+
* Subscriptions - Resource that listens to the messages published by exactly one topic.
23+
*
24+
* [More info here](https://firebase.google.com/docs/functions/pubsub-events)
1425
*/
15-
export type Topic = string;
16-
17-
/**
18-
* Resource that listens to the messages published by exactly one topic.
19-
*/
20-
export type Subscription = string;
2126

2227
/**
2328
* Interface representing a Google Cloud Pub/Sub message.

0 commit comments

Comments
 (0)