Skip to content

Commit 29dc290

Browse files
authored
Refactor: refactor Cluster component (#165)
* Refactor: refactor Cluster component - add p2c loadbalance component - add simple router component - add replay body component - add failover component - add service directory compoent * Enhance: add cache for routers
1 parent a957c54 commit 29dc290

File tree

33 files changed

+1874
-1677
lines changed

33 files changed

+1874
-1677
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[workspace]
2+
resolver = "2"
23
members = [
34
"common/logger",
45
"common/utils",

common/base/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ pub mod node;
2323
pub mod url;
2424

2525
pub use node::Node;
26-
pub use url::Url;
26+
pub use url::Url;

dubbo-build/src/client.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,6 @@ pub fn generate<T: Service>(
7878
}
7979
}
8080

81-
// pub fn build(builder: ClientBuilder) -> Self {
82-
// Self {
83-
// inner: TripleClient::new(builder),
84-
// }
85-
// }
86-
8781
pub fn new(builder: ClientBuilder) -> Self {
8882
Self {
8983
inner: TripleClient::new(builder),

dubbo/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ hyper = { version = "0.14.26", features = ["full"] }
1414
http = "0.2"
1515
tower-service.workspace = true
1616
http-body = "0.4.4"
17-
tower = { workspace = true, features = ["timeout", "ready-cache","discover"] }
17+
tower = { workspace = true, features = ["timeout", "ready-cache","discover","retry"] }
1818
futures-util = "0.3.23"
1919
futures-core ="0.3.23"
2020
argh = "0.1"
2121
rustls-pemfile = "1.0.0"
2222
tokio-rustls="0.23.4"
2323
tokio = { version = "1.0", features = [ "rt-multi-thread", "time", "fs", "macros", "net", "signal", "full" ] }
24+
tokio-util = "0.7.9"
25+
tokio-stream = "0.1"
2426
prost = "0.10.4"
2527
async-trait = "0.1.56"
2628
tower-layer.workspace = true

0 commit comments

Comments
 (0)