mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-08-04 10:53:19 +00:00
refactor: extract messaging client into top-level messaging folder
Move messaging_client.nim and the delivery_service machinery (send/recv services, processors, not_delivered_storage) out of waku/ and waku/node/ into a dedicated top-level messaging/ folder. The delivery services are a messaging-layer concern built on top of the node, not part of node core, so a sibling folder makes that boundary explicit. Shared message types (waku/api/types) and the node-owned subscription_manager are left in place to avoid churn on widely-imported modules. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
38d951a2fd
commit
18e17d2ddd
@ -21,7 +21,7 @@ import stew/byteutils
|
||||
import libp2p/crypto/crypto as libp2p_crypto
|
||||
|
||||
import waku/api/types
|
||||
import waku/node/delivery_service/send_service
|
||||
import messaging/delivery_service/send_service
|
||||
import waku/waku_core/topics
|
||||
|
||||
import ./events
|
||||
|
||||
@ -13,7 +13,7 @@ import stew/byteutils
|
||||
import brokers/broker_context
|
||||
|
||||
import waku/events/message_events as waku_message_events
|
||||
import waku/messaging_client
|
||||
import messaging/messaging_client
|
||||
import waku/waku_core/topics
|
||||
|
||||
import ./reliable_channel
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{.push raises: [].}
|
||||
|
||||
import std/[tables, strutils, os], results, chronicles
|
||||
import ../../../common/databases/db_sqlite, ../../../common/databases/common
|
||||
import waku/common/databases/db_sqlite, waku/common/databases/common
|
||||
|
||||
logScope:
|
||||
topics = "waku node delivery_service"
|
||||
@ -9,9 +9,7 @@
|
||||
|
||||
import results
|
||||
import
|
||||
../../../common/databases/db_sqlite,
|
||||
../../../waku_core/message/message,
|
||||
../../../node/delivery_service/not_delivered_storage/migrations
|
||||
waku/common/databases/db_sqlite, waku/waku_core/message/message, ./migrations
|
||||
|
||||
const NotDeliveredMessagesDbUrl = "not-delivered-messages.db"
|
||||
|
||||
@ -1,14 +1,10 @@
|
||||
import results, chronos
|
||||
import chronicles
|
||||
import
|
||||
./api/types,
|
||||
./node/[
|
||||
waku_node,
|
||||
subscription_manager,
|
||||
delivery_service/recv_service,
|
||||
delivery_service/send_service,
|
||||
delivery_service/send_service/delivery_task,
|
||||
]
|
||||
waku/api/types,
|
||||
waku/node/[waku_node, subscription_manager],
|
||||
messaging/delivery_service/[recv_service, send_service],
|
||||
messaging/delivery_service/send_service/delivery_task
|
||||
|
||||
type MessagingClient* = ref object
|
||||
node: WakuNode
|
||||
@ -6,7 +6,8 @@ import libp2p/[peerid, peerinfo, crypto/crypto]
|
||||
import brokers/broker_context
|
||||
import ../testlib/[common, wakucore, wakunode, testasync]
|
||||
import ../waku_archive/archive_utils
|
||||
import waku/messaging_client
|
||||
import messaging/messaging_client
|
||||
import messaging/delivery_service/recv_service
|
||||
|
||||
import
|
||||
waku,
|
||||
@ -17,7 +18,6 @@ import
|
||||
waku_relay/protocol,
|
||||
waku_archive,
|
||||
waku_archive/common as archive_common,
|
||||
node/delivery_service/recv_service,
|
||||
]
|
||||
import waku/factory/waku_conf
|
||||
import tools/confutils/cli_args
|
||||
|
||||
@ -5,7 +5,7 @@ import chronos, testutils/unittests, stew/byteutils
|
||||
import libp2p/[peerid, peerinfo, multiaddress, crypto/crypto]
|
||||
import brokers/broker_context
|
||||
import ../testlib/[common, wakucore, wakunode, testasync]
|
||||
import waku/messaging_client
|
||||
import messaging/messaging_client
|
||||
|
||||
import
|
||||
waku,
|
||||
|
||||
@ -15,7 +15,6 @@ import
|
||||
node/health_monitor/protocol_health,
|
||||
node/health_monitor/topic_health,
|
||||
node/health_monitor/node_health_monitor,
|
||||
messaging_client,
|
||||
node/waku_node/relay,
|
||||
node/waku_node/store,
|
||||
node/waku_node/lightpush,
|
||||
@ -27,6 +26,7 @@ import
|
||||
|
||||
import ../testlib/[wakunode, wakucore], ../waku_archive/archive_utils
|
||||
import waku/node/subscription_manager
|
||||
import messaging/messaging_client
|
||||
|
||||
const MockDLow = 4 # Mocked GossipSub DLow value
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import chronicles, chronos, results
|
||||
|
||||
import waku/factory/waku
|
||||
import waku/messaging_client
|
||||
import messaging/messaging_client
|
||||
import waku/[requests/health_requests, waku_core, waku_node]
|
||||
import waku/node/delivery_service/send_service
|
||||
import messaging/delivery_service/send_service
|
||||
import waku/node/subscription_manager
|
||||
import libp2p/peerid
|
||||
import ../../tools/confutils/cli_args
|
||||
|
||||
@ -30,7 +30,6 @@ import
|
||||
waku_enr/sharding,
|
||||
waku_enr/multiaddr,
|
||||
api/types,
|
||||
messaging_client,
|
||||
common/logging,
|
||||
node/peer_manager,
|
||||
node/health_monitor,
|
||||
@ -50,6 +49,7 @@ import
|
||||
persistency/persistency,
|
||||
],
|
||||
channels/reliable_channel_manager,
|
||||
messaging/messaging_client,
|
||||
./waku_conf,
|
||||
./waku_state_info
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user