mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-05 23:43:07 +00:00
Added events and requests for support. Reworked delivery_monitor into a featured devlivery_service, that - supports relay publish and lightpush depending on configuration but with fallback options - if available and configured it utilizes store api to confirm message delivery - emits message delivery events accordingly Notice: There are parts still in WIP and needs review and follow ups. prepare for use in api_example
24 lines
597 B
Nim
24 lines
597 B
Nim
import waku/common/broker/event_broker
|
|
import waku/api/types
|
|
|
|
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
|