mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-07-17 13:49:27 +00:00
Add IKernel/IMessagingClient/IReliableChannelManager/ILogosDelivery interface classes under logos_delivery/api/. The EventBroker types PR#3975 hoisted into these files already exist in PR#3989's decomposed */api/events/ modules, so the interface files re-export those modules instead of redefining the types (avoids 8 duplicate EventBroker definitions). api/types.nim kept at the foundation version (ChannelId stays in channels/types.nim, which the decomposed modules import). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
34 lines
1.1 KiB
Nim
34 lines
1.1 KiB
Nim
## `LogosDelivery` is the project entry point. It is a pure concentrator: it
|
|
## owns exactly one instance of each API layer
|
|
##
|
|
## Waku <- MessagingClient <- ReliableChannelManager
|
|
##
|
|
## and chains them together (each layer drives the one below it). Every layer
|
|
## keeps its own, separate public API — `LogosDelivery` only wires them up and
|
|
## drives the shared `new` / `start` / `stop` lifecycle.
|
|
|
|
{.push raises: [].}
|
|
|
|
import results, chronos
|
|
import brokers/event_broker
|
|
import types as api_types
|
|
|
|
export api_types, event_broker
|
|
|
|
type
|
|
## Entry point. Holds one instance of each API layer.
|
|
ILogosDelivery* = ref object of RootObj
|
|
|
|
EventBroker:
|
|
type EventConnectionStatusChange* = object
|
|
connectionStatus*: ConnectionStatus
|
|
|
|
method start*(self: ILogosDelivery): Future[Result[void, string]] {.async, base.} =
|
|
return err("ILogosDelivery.start not implemented")
|
|
|
|
method stop*(self: ILogosDelivery): Future[Result[void, string]] {.async, base.} =
|
|
return err("ILogosDelivery.stop not implemented")
|
|
|
|
method isOnline*(self: ILogosDelivery): Future[Result[bool, string]] {.async, base.} =
|
|
return err("ILogosDelivery.isOnline not implemented")
|