Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 115 additions & 1 deletion rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ url = "2"
regex = "1"
schemars = "1"
jsonschema = "0.49"
axum = "0.8"
rustls = "0.23"

[profile.release]
lto = "fat"
Expand Down
2 changes: 1 addition & 1 deletion rust/crates/adc-backend-api7/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ adc-backend-api7 = { path = ".", features = ["test-utils"] }
adc-differ = { path = "../adc-differ" }
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "net", "time"] }
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls", "json", "cookies"] }
axum = "0.8"
axum = { workspace = true }
8 changes: 4 additions & 4 deletions rust/crates/adc-backend-api7/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub struct Backend {
filter: ResourceFilter,
version: OnceCell<Version>,
default_value: OnceCell<DefaultValue>,
fetch_concurrency: usize,
concurrency: usize,
}

impl Backend {
Expand All @@ -30,7 +30,7 @@ impl Backend {
gateway_group_name: String,
token: &str,
filter: ResourceFilter,
fetch_concurrency: usize,
concurrency: usize,
) -> Self {
let client = client.with_log_scope(vec!["API7".to_string()]);
let gateway_group = GatewayGroupResolver::new(client.clone(), gateway_group_name, token);
Expand All @@ -40,7 +40,7 @@ impl Backend {
filter,
version: OnceCell::new(),
default_value: OnceCell::new(),
fetch_concurrency,
concurrency,
}
}

Expand Down Expand Up @@ -104,7 +104,7 @@ impl adc_sdk::Backend for Backend {
version,
gateway_group_id,
self.filter.clone(),
self.fetch_concurrency,
self.concurrency,
)
.dump()
.await
Expand Down
2 changes: 1 addition & 1 deletion rust/crates/adc-backend-apisix/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ url = { workspace = true }
[dev-dependencies]
adc-backend-apisix = { path = ".", features = ["test-utils"] }
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "net"] }
axum = "0.8"
axum = { workspace = true }
8 changes: 4 additions & 4 deletions rust/crates/adc-backend-apisix/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ pub struct Backend {
client: HttpClient,
filter: ResourceFilter,
version: OnceCell<Version>,
fetch_concurrency: usize,
concurrency: usize,
}

impl Backend {
pub fn new(client: HttpClient, filter: ResourceFilter, fetch_concurrency: usize) -> Self {
pub fn new(client: HttpClient, filter: ResourceFilter, concurrency: usize) -> Self {
Self {
client: client.with_log_scope(vec!["APISIX".to_string()]),
filter,
version: OnceCell::new(),
fetch_concurrency,
concurrency,
}
}

Expand Down Expand Up @@ -89,7 +89,7 @@ impl adc_sdk::Backend for Backend {
self.client.clone(),
version,
self.filter.clone(),
self.fetch_concurrency,
self.concurrency,
)
.dump()
.await
Expand Down
2 changes: 1 addition & 1 deletion rust/crates/adc-backend-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ serde_json = { workspace = true }

[dev-dependencies]
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "net", "time"] }
axum = "0.8"
axum = { workspace = true }
Loading