mirror of
https://github.com/waku-org/nwaku.git
synced 2025-02-13 07:26:51 +00:00
deploy: 3242b0020bf6d6837dcd5425d3291c8b43f96f44
This commit is contained in:
parent
e8f8b48cc4
commit
3910a263b2
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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]
|
||||
|
Loading…
x
Reference in New Issue
Block a user