Fabiana Cecin fd6370f3fa
Implement sub/unsub/receive
* 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
2026-02-24 19:48:34 -03:00

29 lines
1.0 KiB
Nim

{.push raises: [].}
import chronicles, waku/waku_core/topics
# Plan:
# - drive the continuous fulfillment and healing of edge peering and topic subscriptions
# - offload the edgeXXX stuff from WakuNode into this and finish it
type EdgeDriver* = ref object of RootObj # TODO: bg worker, ...
proc new*(T: typedesc[EdgeDriver]): T =
return EdgeDriver()
proc start*(self: EdgeDriver) =
# TODO
debug "TODO: EdgeDriver: start bg worker"
proc stop*(self: EdgeDriver) =
# TODO
debug "TODO: EdgeDriver: stop bg worker"
proc subscribe*(self: EdgeDriver, shard: PubsubTopic, topic: ContentTopic) =
# TODO: this is an event that can be used to drive an event-driven edge health checker
debug "TODO: EdgeDriver: got subscribe notification", shard = shard, topic = topic
proc unsubscribe*(self: EdgeDriver, shard: PubsubTopic, topic: ContentTopic) =
# TODO: this is an event that can be used to drive an event-driven edge health checker
debug "TODO: EdgeDriver: got unsubscribe notification", shard = shard, topic = topic