mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-04-01 22:03:13 +00:00
* Apply insights and constraints from early reviews * Add support for Core/Relay sub/unsub/receive * WIP Edge support (new EdgeDriver placeholder) * Hook MessageReceivedInternalEvent to Kernel API bus * Fix MAPI vs Kernel API unique relay handler support * RecvService delegating topic subs to SubscriptionService * SubscriptionService abstracts Core vs. Edge switching * RecvService emits MessageReceivedEvent (fully filtered) * Delete SubscriptionService.shardSubs * Track relay shard sub with empty contentTopicSubs val * Ensure relay shards never unsubscribed for Core for now
35 lines
976 B
Nim
35 lines
976 B
Nim
import waku/[api/types, waku_core/message, waku_core/topics, common/broker/event_broker]
|
|
|
|
export types
|
|
|
|
EventBroker:
|
|
# Event emitted when a message is sent to the network
|
|
type MessageSentEvent* = object
|
|
requestId*: RequestId
|
|
messageHash*: string
|
|
|
|
EventBroker:
|
|
# Event emitted when a message send operation fails
|
|
type MessageErrorEvent* = object
|
|
requestId*: RequestId
|
|
messageHash*: string
|
|
error*: string
|
|
|
|
EventBroker:
|
|
# Confirmation that a message has been correctly delivered to some neighbouring nodes.
|
|
type MessagePropagatedEvent* = object
|
|
requestId*: RequestId
|
|
messageHash*: string
|
|
|
|
EventBroker:
|
|
# Event emitted when a message is received via Waku
|
|
type MessageReceivedEvent* = object
|
|
messageHash*: string
|
|
message*: WakuMessage
|
|
|
|
EventBroker:
|
|
# Internal event emitted when a message arrives from the network via any protocol
|
|
type MessageReceivedInternalEvent* = object
|
|
topic*: PubsubTopic
|
|
message*: WakuMessage
|