mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-07-11 02:39:53 +00:00
* squash original commits and rebase to master: removed sendHandler and replaced by MessagingSend BrokerRequest * Needed to adapt to new messaging source structure to avoid cyclic imports * Relocate MessagingSend request broker and eliminate api/requests * fix ci fails
16 lines
597 B
Nim
16 lines
597 B
Nim
import chronos, results
|
|
|
|
import logos_delivery/api/types as api_types
|
|
import logos_delivery/channels/types as channel_types
|
|
|
|
export api_types, channel_types
|
|
|
|
# Structural API contract for the reliable-channel surface (ops in `channels/api/*`).
|
|
type ReliableChannelApi* = concept c
|
|
createReliableChannel(
|
|
c, channelId = ChannelId, contentTopic = ContentTopic, senderId = SdsParticipantID
|
|
) is Result[ChannelId, string]
|
|
closeChannel(c, channelId = ChannelId) is Future[Result[void, string]]
|
|
send(c, channelId = ChannelId, appPayload = seq[byte]) is
|
|
Future[Result[RequestId, string]]
|