move broker_store into submod

pull/19/head
Niko PLP 2 years ago
parent f269e8da5c
commit 178a5ebba0
  1. 2
      ngcli/src/main.rs
  2. 2
      p2p-broker/src/broker_store/account.rs
  3. 0
      p2p-broker/src/broker_store/config.rs
  4. 11
      p2p-broker/src/broker_store/mod.rs
  5. 0
      p2p-broker/src/broker_store/overlay.rs
  6. 0
      p2p-broker/src/broker_store/peer.rs
  7. 0
      p2p-broker/src/broker_store/repostoreinfo.rs
  8. 0
      p2p-broker/src/broker_store/topic.rs
  9. 12
      p2p-broker/src/lib.rs
  10. 18
      p2p-broker/src/server.rs
  11. 2
      p2p-broker/src/server_ws.rs

@ -15,7 +15,7 @@ use fastbloom_rs::{BloomFilter as Filter, FilterBuilder, Membership};
use futures::{future, pin_mut, stream, SinkExt, StreamExt}; use futures::{future, pin_mut, stream, SinkExt, StreamExt};
use p2p_repo::object::Object; use p2p_repo::object::Object;
use p2p_repo::store::{store_max_value_size, store_valid_value_size, HashMapRepoStore, RepoStore}; use p2p_repo::store::{store_max_value_size, store_valid_value_size, HashMapRepoStore, RepoStore};
use p2p_broker::broker_store_config::ConfigMode; use p2p_broker::broker_store::config::ConfigMode;
use p2p_stores_lmdb::broker_store::LmdbBrokerStore; use p2p_stores_lmdb::broker_store::LmdbBrokerStore;
use p2p_stores_lmdb::repo_store::LmdbRepoStore; use p2p_stores_lmdb::repo_store::LmdbRepoStore;
use rand::rngs::OsRng; use rand::rngs::OsRng;

@ -165,7 +165,7 @@ mod test {
use std::fs; use std::fs;
use tempfile::Builder; use tempfile::Builder;
use crate::broker_store_account::Account; use crate::broker_store::account::Account;
#[test] #[test]
pub fn test_account() { pub fn test_account() {

@ -0,0 +1,11 @@
pub mod account;
pub mod config;
pub mod overlay;
pub mod peer;
pub mod repostoreinfo;
pub mod topic;

@ -1,15 +1,5 @@
// Copyright (c) 2022-2023 Niko Bonnieure, Par le Peuple, NextGraph.org developers
pub mod broker_store_account;
pub mod broker_store_config; pub mod broker_store;
pub mod broker_store_overlay;
pub mod broker_store_peer;
pub mod broker_store_repostoreinfo;
pub mod broker_store_topic;
pub mod connection_local; pub mod connection_local;

@ -15,15 +15,15 @@ use std::pin::Pin;
use std::sync::Arc; use std::sync::Arc;
use std::sync::RwLock; use std::sync::RwLock;
use crate::broker_store_account::Account; use crate::broker_store::account::Account;
use crate::auth::*; use crate::auth::*;
use crate::broker_store_config::Config; use crate::broker_store::config::Config;
use crate::broker_store_config::ConfigMode; use crate::broker_store::config::ConfigMode;
use crate::connection_local::BrokerConnectionLocal; use crate::connection_local::BrokerConnectionLocal;
use crate::broker_store_overlay::Overlay; use crate::broker_store::overlay::Overlay;
use crate::broker_store_peer::Peer; use crate::broker_store::peer::Peer;
use crate::broker_store_repostoreinfo::RepoStoreId; use crate::broker_store::repostoreinfo::RepoStoreId;
use crate::broker_store_repostoreinfo::RepoStoreInfo; use crate::broker_store::repostoreinfo::RepoStoreInfo;
use async_std::task; use async_std::task;
use debug_print::*; use debug_print::*;
use futures::future::BoxFuture; use futures::future::BoxFuture;
@ -72,7 +72,7 @@ enum ProtocolType {
Auth, Auth,
Broker, Broker,
Ext, Ext,
P2P, Core,
} }
pub struct ProtocolHandler { pub struct ProtocolHandler {
@ -164,7 +164,7 @@ impl ProtocolHandler {
// closing the connection // closing the connection
(Err(ProtocolError::InvalidState), OptionFuture::from(None)) (Err(ProtocolError::InvalidState), OptionFuture::from(None))
} }
ProtocolType::P2P => { ProtocolType::Core => {
unimplemented!() unimplemented!()
} }
} }

@ -18,7 +18,7 @@ use async_tungstenite::accept_async;
use async_tungstenite::tungstenite::protocol::Message; use async_tungstenite::tungstenite::protocol::Message;
use debug_print::*; use debug_print::*;
use futures::{SinkExt, StreamExt}; use futures::{SinkExt, StreamExt};
use crate::broker_store_config::ConfigMode; use crate::broker_store::config::ConfigMode;
use crate::server::*; use crate::server::*;
use p2p_stores_lmdb::broker_store::LmdbBrokerStore; use p2p_stores_lmdb::broker_store::LmdbBrokerStore;
use p2p_stores_lmdb::repo_store::LmdbRepoStore; use p2p_stores_lmdb::repo_store::LmdbRepoStore;

Loading…
Cancel
Save