mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-07-16 21:30:14 +00:00
Remove unused MessagingClient reference from ReliableChannelManager - the new request broker completes the contract just perfect.
This commit is contained in:
parent
e37e04d5e6
commit
4995b86d13
@ -36,28 +36,14 @@ type
|
||||
|
||||
ReliableChannelManager* = ref object of IReliableChannelManager
|
||||
channels: Table[ChannelId, ReliableChannel]
|
||||
messagingClient: MessagingClient ## The channel layer chains onto messaging.
|
||||
brokerCtx: BrokerContext
|
||||
|
||||
proc new*(
|
||||
T: type ReliableChannelManager,
|
||||
conf: ReliableChannelManagerConf,
|
||||
messagingClient: MessagingClient,
|
||||
brokerCtx: BrokerContext = globalBrokerContext(),
|
||||
): Result[T, string] =
|
||||
## The reliable channel layer chains onto the messaging layer: its default
|
||||
## egress is `MessagingClient.send`, wrapped here so callers never wire the
|
||||
## handler themselves.
|
||||
if messagingClient.isNil():
|
||||
return err("messaging client is required")
|
||||
|
||||
return ok(
|
||||
T(
|
||||
channels: initTable[ChannelId, ReliableChannel](),
|
||||
messagingClient: messagingClient,
|
||||
brokerCtx: brokerCtx,
|
||||
)
|
||||
)
|
||||
return ok(T(channels: initTable[ChannelId, ReliableChannel](), brokerCtx: brokerCtx))
|
||||
|
||||
proc start*(self: ReliableChannelManager): Result[void, string] =
|
||||
## Placeholder: per-channel listeners are installed in `ReliableChannel.new`,
|
||||
|
||||
@ -70,7 +70,7 @@ proc new*(
|
||||
return err("failed to create MessagingClient: " & error)
|
||||
|
||||
let reliableChannelManager = ReliableChannelManager.new(
|
||||
layerConf.reliableChannel, messagingClient, waku.brokerCtx
|
||||
layerConf.reliableChannel, waku.brokerCtx
|
||||
).valueOr:
|
||||
return err("failed to create ReliableChannelManager: " & error)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user