Split services into different crates (#13)
This commit is contained in:
parent
26e5580443
commit
90c7de6271
|
@ -1,5 +1,7 @@
|
|||
[workspace]
|
||||
|
||||
members = [
|
||||
"nomos-services"
|
||||
"nomos-services/log",
|
||||
"nomos-services/network",
|
||||
"nomos-services/storage"
|
||||
]
|
|
@ -0,0 +1,16 @@
|
|||
[package]
|
||||
name = "nomos-log"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
async-trait = "0.1"
|
||||
overwatch-rs = { git = "https://github.com/logos-co/Overwatch", branch = "main" }
|
||||
serde = "1.0"
|
||||
tracing = "0.1"
|
||||
tracing-appender = "0.2"
|
||||
tracing-subscriber = { version = "0.3", features = ["json"] }
|
||||
tracing-gelf = "0.7"
|
||||
futures = "0.3"
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "nomos-services"
|
||||
name = "nomos-network"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
|
@ -15,17 +15,11 @@ sled = { version = "0.34", optional = true }
|
|||
tokio = { version = "1", features = ["sync"] }
|
||||
thiserror = "1.0"
|
||||
tracing = "0.1"
|
||||
waku = { git = "https://github.com/waku-org/waku-rust-bindings" }
|
||||
waku = { git = "https://github.com/waku-org/waku-rust-bindings", optional = true }
|
||||
tracing-appender = "0.2"
|
||||
tracing-subscriber = { version = "0.3", features = ["json"] }
|
||||
tracing-gelf = "0.7"
|
||||
futures = "0.3"
|
||||
|
||||
[dev-dependencies]
|
||||
tempfile = "3.3"
|
||||
tokio = { version = "1", features = ["sync", "macros", "time"] }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
mock = []
|
||||
sled-backend = ["sled"]
|
||||
default = ["waku"]
|
|
@ -2,7 +2,9 @@ use super::*;
|
|||
use overwatch_rs::services::state::ServiceState;
|
||||
use tokio::sync::broadcast::Receiver;
|
||||
|
||||
#[cfg(feature = "waku")]
|
||||
mod waku;
|
||||
#[cfg(feature = "waku")]
|
||||
pub use self::waku::Waku;
|
||||
|
||||
#[async_trait::async_trait]
|
|
@ -1,3 +0,0 @@
|
|||
pub mod log;
|
||||
pub mod network;
|
||||
pub mod storage;
|
|
@ -0,0 +1,25 @@
|
|||
[package]
|
||||
name = "nomos-storage"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
async-trait = "0.1"
|
||||
tokio = { version = "1", features = ["sync"] }
|
||||
bytes = "1.2"
|
||||
overwatch-rs = { git = "https://github.com/logos-co/Overwatch", branch = "main" }
|
||||
serde = "1.0"
|
||||
sled = { version = "0.34", optional = true }
|
||||
thiserror = "1.0"
|
||||
tracing = "0.1"
|
||||
|
||||
[dev-dependencies]
|
||||
tempfile = "3.3"
|
||||
tokio = { version = "1", features = ["sync", "macros", "time"] }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
mock = []
|
||||
sled-backend = ["sled"]
|
|
@ -9,8 +9,8 @@ use bytes::Bytes;
|
|||
use overwatch_rs::services::handle::ServiceStateHandle;
|
||||
use serde::de::DeserializeOwned;
|
||||
// internal
|
||||
use crate::storage::backends::{StorageSerde, StorageTransaction};
|
||||
use backends::StorageBackend;
|
||||
use backends::{StorageSerde, StorageTransaction};
|
||||
use overwatch_rs::services::relay::RelayMessage;
|
||||
use overwatch_rs::services::state::{NoOperator, NoState};
|
||||
use overwatch_rs::services::{ServiceCore, ServiceData, ServiceId};
|
Loading…
Reference in New Issue