From 53703152ffe412305f338ec5536c4503a45ee61f Mon Sep 17 00:00:00 2001 From: Nikita Vilunov Date: Tue, 6 Feb 2024 13:14:22 +0100 Subject: [PATCH] wip --- Cargo.lock | 79 +++++++++++++++++++++++++++++++++++ crates/lavina-core/Cargo.toml | 1 + 2 files changed, 80 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index df548da..daa0f04 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -93,6 +93,15 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "anyerror" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcd04a72664a65fb9adeae7ced0c98efd68a2b7a45adda8319b3bb36538404b8" +dependencies = [ + "serde", +] + [[package]] name = "anyhow" version = "1.0.75" @@ -280,6 +289,16 @@ version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +[[package]] +name = "byte-unit" +version = "4.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da78b32057b8fdfc352504708feeba7216dcd65a2c9ab02978cbd288d1279b6c" +dependencies = [ + "serde", + "utf8-width", +] + [[package]] name = "bytemuck" version = "1.14.0" @@ -639,6 +658,21 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "futures" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + [[package]] name = "futures-channel" version = "0.3.29" @@ -712,6 +746,7 @@ version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" dependencies = [ + "futures-channel", "futures-core", "futures-io", "futures-macro", @@ -1108,6 +1143,7 @@ dependencies = [ "anyhow", "etcd-client", "inner-api", + "openraft", "prometheus", "prost", "serde", @@ -1171,6 +1207,12 @@ version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +[[package]] +name = "maplit" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" + [[package]] name = "matchit" version = "0.7.3" @@ -1354,6 +1396,27 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +[[package]] +name = "openraft" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e189b3a5107b4911365ab1d2e26e04f9f30602927ff81265d2cb2f6ee454313c" +dependencies = [ + "anyerror", + "async-trait", + "byte-unit", + "clap", + "derive_more", + "futures", + "maplit", + "pin-utils", + "rand", + "thiserror", + "tokio", + "tracing", + "tracing-futures", +] + [[package]] name = "overload" version = "0.1.1" @@ -2666,6 +2729,16 @@ dependencies = [ "valuable", ] +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "pin-project", + "tracing", +] + [[package]] name = "tracing-log" version = "0.2.0" @@ -2768,6 +2841,12 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" +[[package]] +name = "utf8-width" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" + [[package]] name = "utf8parse" version = "0.2.1" diff --git a/crates/lavina-core/Cargo.toml b/crates/lavina-core/Cargo.toml index 3b77ca0..ce9dbde 100644 --- a/crates/lavina-core/Cargo.toml +++ b/crates/lavina-core/Cargo.toml @@ -14,3 +14,4 @@ prometheus.workspace = true inner-api = { path = "../inner-api" } prost.workspace = true etcd-client = "0.12.3" +openraft = "0.8.8"