Add functionality to unsubscribe from pubsub topic (#241)

This commit is contained in:
Hanno Cornelius
2020-10-27 09:13:56 +08:00
committed by GitHub
parent aab93912ef
commit 16c4e65762
3 changed files with 33 additions and 9 deletions
+8 -4
View File
@@ -40,11 +40,15 @@ proc subscribe*(node: WakuNode, request: FilterRequest, handler: ContentFilterHa
##
## Status: Implemented.
proc unsubscribe*(w: WakuNode, topic: Topic) =
## Unsubscribe from a topic.
proc unsubscribe*(node: WakuNode, topic: Topic, handler: TopicHandler) {.async.} =
## Unsubscribes a handler from a PubSub topic.
##
## Status: Not yet implemented.
## TODO Implement.
## Status: Implemented.
proc unsubscribeAll*(node: WakuNode, topic: Topic) {.async.} =
## Unsubscribes all handlers registered on a specific PubSub topic.
##
## Status: Implemented.
proc unsubscribe*(w: WakuNode, contentFilter: ContentFilter) =
## Unsubscribe from a content filter.