mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-07 16:33:08 +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
634 B
Nim
24 lines
634 B
Nim
import waku/common/broker/[request_broker, multi_request_broker]
|
|
|
|
import waku/api/types
|
|
import waku/node/health_monitor/[protocol_health, topic_health]
|
|
import waku/waku_core/topics
|
|
|
|
export protocol_health, topic_health
|
|
|
|
RequestBroker:
|
|
type RequestNodeHealth* = object
|
|
healthStatus*: NodeHealth
|
|
|
|
RequestBroker:
|
|
type RequestRelayTopicsHealth* = object
|
|
topicHealth*: seq[tuple[topic: PubsubTopic, health: TopicHealth]]
|
|
|
|
proc signature(
|
|
topics: seq[PubsubTopic]
|
|
): Future[Result[RequestRelayTopicsHealth, string]] {.async.}
|
|
|
|
MultiRequestBroker:
|
|
type RequestProtocolHealth* = object
|
|
healthStatus*: ProtocolHealth
|