logos-messaging-nim/logos_delivery/api/messaging_client_api.nim
NagyZoltanPeter 1b5dea1128
Graft PR#3975 interface layer onto decomposed foundation (events deduped)
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>
2026-06-25 19:32:54 +02:00

30 lines
1.1 KiB
Nim

import chronos, results
import brokers/event_broker
import logos_delivery/api/types as api_types
# The messaging-layer event surface lives in the decomposed
# `messaging/api/events` module. Re-export it here so the events stay reachable
# at the interface level without duplicating the EventBroker types.
import logos_delivery/messaging/api/events as messaging_events
export event_broker, api_types
export messaging_events
type IMessagingClient* = ref object of RootObj
method subscribe*(
self: IMessagingClient, contentTopic: ContentTopic
): Future[Result[void, string]] {.async: (raises: []), base.} =
return err("Interface IMessagingClient.subscribe not implemented")
method unsubscribe*(
self: IMessagingClient, contentTopic: ContentTopic
): Result[void, string] {.base, raises: [].} =
return err("Interface IMessagingClient.unsubscribe not implemented")
method send*(
self: IMessagingClient, envelope: MessageEnvelope
): Future[Result[RequestId, string]] {.async: (raises: []), base.} =
return err("Interface IMessagingClient.send not implemented")