-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix!: update pubsub subscribe method to return subscription (#186)
Subscribing to pubsub topics is a two step process - first we subscribe then we recieve messages. We may subscribe and not receive messages, so change the return type to reflect that. It now returns a promise, after which is resolved the node is subscribed, and the response has a `messages` method that can be used to iterate over any received messages, and a `cancel` method that will cancel the subscription.
- Loading branch information
1 parent
cc79162
commit 88e4bf5
Showing
2 changed files
with
29 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters