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
22 lines
498 B
Nim
22 lines
498 B
Nim
import chronos
|
|
|
|
import waku/waku_core
|
|
|
|
type TopicHealth* = enum
|
|
UNHEALTHY
|
|
MINIMALLY_HEALTHY
|
|
SUFFICIENTLY_HEALTHY
|
|
NOT_SUBSCRIBED
|
|
|
|
proc `$`*(t: TopicHealth): string =
|
|
result =
|
|
case t
|
|
of UNHEALTHY: "UnHealthy"
|
|
of MINIMALLY_HEALTHY: "MinimallyHealthy"
|
|
of SUFFICIENTLY_HEALTHY: "SufficientlyHealthy"
|
|
of NOT_SUBSCRIBED: "NotSubscribed"
|
|
|
|
type TopicHealthChangeHandler* = proc(
|
|
pubsubTopic: PubsubTopic, topicHealth: TopicHealth
|
|
): Future[void] {.gcsafe, raises: [Defect].}
|