deploy: 3242b0020bf6d6837dcd5425d3291c8b43f96f44

This commit is contained in:
decanus 2021-01-04 12:16:48 +00:00
parent e8f8b48cc4
commit 3910a263b2
4 changed files with 26 additions and 9 deletions

View File

@ -10,7 +10,7 @@ generated by GNU Autoconf 2.69. Invocation command line was
## Platform. ##
## --------- ##
hostname = fv-az16-39
hostname = fv-az54-194
uname -m = x86_64
uname -r = 5.4.0-1032-azure
uname -s = Linux
@ -841,7 +841,7 @@ configure:12482: $? = 0
configure:12482: result: yes
configure:12499: checking for getexecname
configure:12499: gcc -o conftest -g -O3 -std=gnu11 -pipe -Wall -Wextra -fPIC conftest.c >&5
/tmp/ccT1KpG9.o: In function `main':
/tmp/ccey3l65.o: In function `main':
/home/runner/work/nim-waku/nim-waku/vendor/nim-libbacktrace/vendor/libbacktrace-upstream/conftest.c:73: undefined reference to `getexecname'
collect2: error: ld returned 1 exit status
configure:12499: $? = 1
@ -1134,7 +1134,7 @@ generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_COMMANDS =
$ ./config.status
on fv-az16-39
on fv-az54-194
config.status:1150: creating Makefile
config.status:1150: creating backtrace-supported.h

View File

@ -2,7 +2,7 @@
# libtool - Provide generalized library-building support services.
# Generated automatically by config.status (libbacktrace) version-unused
# Libtool was configured on host fv-az16-39:
# Libtool was configured on host fv-az54-194:
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,

View File

@ -3,11 +3,26 @@ import
chronos,
../waku_types
# The Message Notification system is a method to notify various protocols
# running on a node when a new message was received.
## The Message Notification system is a method to notify various protocols
## running on a node when a new message was received.
#
# Protocols can subscribe to messages of specific topics, then when one is received
# The notification handler function will be called.
## Protocols can subscribe to messages of specific topics, then when one is received
## The notification handler function will be called.
##
## This works as follows:
##
## .. code-block::
## var topic = "foo"
##
## proc handle(topic: string, msg: WakuMessage) {.async.} =
## info "new message", msg = msg
##
## MessageNotificationSubscription.init(@[topic], handle)
##
## var subscriptions = newTable[string, MessageNotificationSubscription]()
## subscriptions["identifier"] = subscription
##
## await subscriptions.notify(topic, WakuMessage(payload: @[byte 1, 2, 3], contentTopic: ContentTopic(1)))
proc subscribe*(subscriptions: MessageNotificationSubscriptions, name: string, subscription: MessageNotificationSubscription) =
subscriptions.add(name, subscription)

View File

@ -38,11 +38,13 @@ type
MessageNotificationHandler* = proc(topic: string, msg: WakuMessage): Future[
void] {.gcsafe, closure.}
MessageNotificationSubscriptions* = TableRef[string, MessageNotificationSubscription]
MessageNotificationSubscriptionIdentifier* = string
MessageNotificationSubscription* = object
topics*: seq[string] # @TODO TOPIC
handler*: MessageNotificationHandler
MessageNotificationSubscriptions* = TableRef[MessageNotificationSubscriptionIdentifier, MessageNotificationSubscription]
FilterRequest* = object
contentFilters*: seq[ContentFilter]