diff --git a/Cargo.Bazel.lock b/Cargo.Bazel.lock index 72e8953a..44932973 100644 --- a/Cargo.Bazel.lock +++ b/Cargo.Bazel.lock @@ -1,5 +1,5 @@ { - "checksum": "5065070682199bcc2be925ea02638782ca93ec6b05c7ce475c603c4436f75d92", + "checksum": "a3372bb894f86634c80e5bf284230dda73a380e8d62210533b5e46d3f1a4d718", "crates": { "actix-codec 0.5.2": { "name": "actix-codec", @@ -3196,6 +3196,188 @@ }, "license": "MIT" }, + "axum 0.7.4": { + "name": "axum", + "version": "0.7.4", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/axum/0.7.4/download", + "sha256": "1236b4b292f6c4d6dc34604bb5120d85c3fe1d1aa596bd5cc52ca054d13e7b9e" + } + }, + "targets": [ + { + "Library": { + "crate_name": "axum", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "axum", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "form", + "http1", + "json", + "matched-path", + "original-uri", + "query", + "tokio", + "tower-log", + "tracing" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "axum 0.7.4", + "target": "build_script_build" + }, + { + "id": "axum-core 0.4.3", + "target": "axum_core" + }, + { + "id": "bytes 1.5.0", + "target": "bytes" + }, + { + "id": "futures-util 0.3.30", + "target": "futures_util" + }, + { + "id": "http 1.0.0", + "target": "http" + }, + { + "id": "http-body 1.0.0", + "target": "http_body" + }, + { + "id": "http-body-util 0.1.0", + "target": "http_body_util" + }, + { + "id": "hyper 1.1.0", + "target": "hyper" + }, + { + "id": "hyper-util 0.1.3", + "target": "hyper_util" + }, + { + "id": "itoa 1.0.10", + "target": "itoa" + }, + { + "id": "matchit 0.7.3", + "target": "matchit" + }, + { + "id": "memchr 2.7.1", + "target": "memchr" + }, + { + "id": "mime 0.3.17", + "target": "mime" + }, + { + "id": "percent-encoding 2.3.1", + "target": "percent_encoding" + }, + { + "id": "pin-project-lite 0.2.13", + "target": "pin_project_lite" + }, + { + "id": "serde 1.0.196", + "target": "serde" + }, + { + "id": "serde_json 1.0.113", + "target": "serde_json" + }, + { + "id": "serde_path_to_error 0.1.15", + "target": "serde_path_to_error" + }, + { + "id": "serde_urlencoded 0.7.1", + "target": "serde_urlencoded" + }, + { + "id": "sync_wrapper 0.1.2", + "target": "sync_wrapper" + }, + { + "id": "tokio 1.36.0", + "target": "tokio" + }, + { + "id": "tower 0.4.13", + "target": "tower" + }, + { + "id": "tower-layer 0.3.2", + "target": "tower_layer" + }, + { + "id": "tower-service 0.3.2", + "target": "tower_service" + }, + { + "id": "tracing 0.1.40", + "target": "tracing" + } + ], + "selects": {} + }, + "edition": "2021", + "proc_macro_deps": { + "common": [ + { + "id": "async-trait 0.1.77", + "target": "async_trait" + } + ], + "selects": {} + }, + "version": "0.7.4" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "proc_macro_deps": { + "common": [ + { + "id": "rustversion 1.0.14", + "target": "rustversion" + } + ], + "selects": {} + } + }, + "license": "MIT" + }, "axum-core 0.3.4": { "name": "axum-core", "version": "0.3.4", @@ -3295,6 +3477,127 @@ }, "license": "MIT" }, + "axum-core 0.4.3": { + "name": "axum-core", + "version": "0.4.3", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/axum-core/0.4.3/download", + "sha256": "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" + } + }, + "targets": [ + { + "Library": { + "crate_name": "axum_core", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + }, + { + "BuildScript": { + "crate_name": "build_script_build", + "crate_root": "build.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "axum_core", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "tracing" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "axum-core 0.4.3", + "target": "build_script_build" + }, + { + "id": "bytes 1.5.0", + "target": "bytes" + }, + { + "id": "futures-util 0.3.30", + "target": "futures_util" + }, + { + "id": "http 1.0.0", + "target": "http" + }, + { + "id": "http-body 1.0.0", + "target": "http_body" + }, + { + "id": "http-body-util 0.1.0", + "target": "http_body_util" + }, + { + "id": "mime 0.3.17", + "target": "mime" + }, + { + "id": "pin-project-lite 0.2.13", + "target": "pin_project_lite" + }, + { + "id": "sync_wrapper 0.1.2", + "target": "sync_wrapper" + }, + { + "id": "tower-layer 0.3.2", + "target": "tower_layer" + }, + { + "id": "tower-service 0.3.2", + "target": "tower_service" + }, + { + "id": "tracing 0.1.40", + "target": "tracing" + } + ], + "selects": {} + }, + "edition": "2021", + "proc_macro_deps": { + "common": [ + { + "id": "async-trait 0.1.77", + "target": "async_trait" + } + ], + "selects": {} + }, + "version": "0.4.3" + }, + "build_script_attrs": { + "data_glob": [ + "**" + ], + "proc_macro_deps": { + "common": [ + { + "id": "rustversion 1.0.14", + "target": "rustversion" + } + ], + "selects": {} + } + }, + "license": "MIT" + }, "backoff 0.4.0": { "name": "backoff", "version": "0.4.0", @@ -14132,6 +14435,85 @@ }, "license": "MIT" }, + "h2 0.4.2": { + "name": "h2", + "version": "0.4.2", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/h2/0.4.2/download", + "sha256": "31d030e59af851932b72ceebadf4a2b5986dba4c3b99dd2493f8273a0f151943" + } + }, + "targets": [ + { + "Library": { + "crate_name": "h2", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "h2", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "bytes 1.5.0", + "target": "bytes" + }, + { + "id": "fnv 1.0.7", + "target": "fnv" + }, + { + "id": "futures-core 0.3.30", + "target": "futures_core" + }, + { + "id": "futures-sink 0.3.30", + "target": "futures_sink" + }, + { + "id": "futures-util 0.3.30", + "target": "futures_util" + }, + { + "id": "http 1.0.0", + "target": "http" + }, + { + "id": "indexmap 2.2.2", + "target": "indexmap" + }, + { + "id": "slab 0.4.9", + "target": "slab" + }, + { + "id": "tokio 1.36.0", + "target": "tokio" + }, + { + "id": "tokio-util 0.7.10", + "target": "tokio_util" + }, + { + "id": "tracing 0.1.40", + "target": "tracing" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.4.2" + }, + "license": "MIT" + }, "half 1.8.2": { "name": "half", "version": "1.8.2", @@ -14350,108 +14732,6 @@ }, "license": "MIT/Apache-2.0" }, - "headers 0.3.9": { - "name": "headers", - "version": "0.3.9", - "repository": { - "Http": { - "url": "https://crates.io/api/v1/crates/headers/0.3.9/download", - "sha256": "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" - } - }, - "targets": [ - { - "Library": { - "crate_name": "headers", - "crate_root": "src/lib.rs", - "srcs": [ - "**/*.rs" - ] - } - } - ], - "library_target_name": "headers", - "common_attrs": { - "compile_data_glob": [ - "**" - ], - "deps": { - "common": [ - { - "id": "base64 0.21.7", - "target": "base64" - }, - { - "id": "bytes 1.5.0", - "target": "bytes" - }, - { - "id": "headers-core 0.2.0", - "target": "headers_core" - }, - { - "id": "http 0.2.11", - "target": "http" - }, - { - "id": "httpdate 1.0.3", - "target": "httpdate" - }, - { - "id": "mime 0.3.17", - "target": "mime" - }, - { - "id": "sha1 0.10.6", - "target": "sha1" - } - ], - "selects": {} - }, - "edition": "2015", - "version": "0.3.9" - }, - "license": "MIT" - }, - "headers-core 0.2.0": { - "name": "headers-core", - "version": "0.2.0", - "repository": { - "Http": { - "url": "https://crates.io/api/v1/crates/headers-core/0.2.0/download", - "sha256": "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" - } - }, - "targets": [ - { - "Library": { - "crate_name": "headers_core", - "crate_root": "src/lib.rs", - "srcs": [ - "**/*.rs" - ] - } - } - ], - "library_target_name": "headers_core", - "common_attrs": { - "compile_data_glob": [ - "**" - ], - "deps": { - "common": [ - { - "id": "http 0.2.11", - "target": "http" - } - ], - "selects": {} - }, - "edition": "2015", - "version": "0.2.0" - }, - "license": "MIT" - }, "heck 0.4.1": { "name": "heck", "version": "0.4.1", @@ -14807,6 +15087,60 @@ }, "license": "MIT OR Apache-2.0" }, + "http 1.0.0": { + "name": "http", + "version": "1.0.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/http/1.0.0/download", + "sha256": "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" + } + }, + "targets": [ + { + "Library": { + "crate_name": "http", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "http", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "std" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "bytes 1.5.0", + "target": "bytes" + }, + { + "id": "fnv 1.0.7", + "target": "fnv" + }, + { + "id": "itoa 1.0.10", + "target": "itoa" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.0.0" + }, + "license": "MIT OR Apache-2.0" + }, "http-body 0.4.6": { "name": "http-body", "version": "0.4.6", @@ -14854,6 +15188,104 @@ }, "license": "MIT" }, + "http-body 1.0.0": { + "name": "http-body", + "version": "1.0.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/http-body/1.0.0/download", + "sha256": "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" + } + }, + "targets": [ + { + "Library": { + "crate_name": "http_body", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "http_body", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "bytes 1.5.0", + "target": "bytes" + }, + { + "id": "http 1.0.0", + "target": "http" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.0.0" + }, + "license": "MIT" + }, + "http-body-util 0.1.0": { + "name": "http-body-util", + "version": "0.1.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/http-body-util/0.1.0/download", + "sha256": "41cb79eb393015dadd30fc252023adb0b2400a0caee0fa2a077e6e21a551e840" + } + }, + "targets": [ + { + "Library": { + "crate_name": "http_body_util", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "http_body_util", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "bytes 1.5.0", + "target": "bytes" + }, + { + "id": "futures-util 0.3.30", + "target": "futures_util" + }, + { + "id": "http 1.0.0", + "target": "http" + }, + { + "id": "http-body 1.0.0", + "target": "http_body" + }, + { + "id": "pin-project-lite 0.2.13", + "target": "pin_project_lite" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "0.1.0" + }, + "license": "MIT" + }, "http-types 2.12.0": { "name": "http-types", "version": "2.12.0", @@ -15292,6 +15724,94 @@ }, "license": "MIT" }, + "hyper 1.1.0": { + "name": "hyper", + "version": "1.1.0", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/hyper/1.1.0/download", + "sha256": "fb5aa53871fc917b1a9ed87b683a5d86db645e23acb32c2e0785a353e522fb75" + } + }, + "targets": [ + { + "Library": { + "crate_name": "hyper", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "hyper", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "http1", + "http2", + "server" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "bytes 1.5.0", + "target": "bytes" + }, + { + "id": "futures-channel 0.3.30", + "target": "futures_channel" + }, + { + "id": "futures-util 0.3.30", + "target": "futures_util" + }, + { + "id": "h2 0.4.2", + "target": "h2" + }, + { + "id": "http 1.0.0", + "target": "http" + }, + { + "id": "http-body 1.0.0", + "target": "http_body" + }, + { + "id": "httparse 1.8.0", + "target": "httparse" + }, + { + "id": "httpdate 1.0.3", + "target": "httpdate" + }, + { + "id": "itoa 1.0.10", + "target": "itoa" + }, + { + "id": "pin-project-lite 0.2.13", + "target": "pin_project_lite" + }, + { + "id": "tokio 1.36.0", + "target": "tokio" + } + ], + "selects": {} + }, + "edition": "2018", + "version": "1.1.0" + }, + "license": "MIT" + }, "hyper-rustls 0.24.2": { "name": "hyper-rustls", "version": "0.24.2", @@ -15480,6 +16000,84 @@ }, "license": "MIT/Apache-2.0" }, + "hyper-util 0.1.3": { + "name": "hyper-util", + "version": "0.1.3", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/hyper-util/0.1.3/download", + "sha256": "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" + } + }, + "targets": [ + { + "Library": { + "crate_name": "hyper_util", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "hyper_util", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "crate_features": { + "common": [ + "default", + "http1", + "http2", + "server", + "server-auto", + "tokio" + ], + "selects": {} + }, + "deps": { + "common": [ + { + "id": "bytes 1.5.0", + "target": "bytes" + }, + { + "id": "futures-util 0.3.30", + "target": "futures_util" + }, + { + "id": "http 1.0.0", + "target": "http" + }, + { + "id": "http-body 1.0.0", + "target": "http_body" + }, + { + "id": "hyper 1.1.0", + "target": "hyper" + }, + { + "id": "pin-project-lite 0.2.13", + "target": "pin_project_lite" + }, + { + "id": "socket2 0.5.5", + "target": "socket2" + }, + { + "id": "tokio 1.36.0", + "target": "tokio" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.1.3" + }, + "license": "MIT" + }, "iana-time-zone 0.1.60": { "name": "iana-time-zone", "version": "0.1.60", @@ -27829,83 +28427,6 @@ }, "license": "MIT OR Apache-2.0" }, - "mime_guess 2.0.4": { - "name": "mime_guess", - "version": "2.0.4", - "repository": { - "Http": { - "url": "https://crates.io/api/v1/crates/mime_guess/2.0.4/download", - "sha256": "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" - } - }, - "targets": [ - { - "Library": { - "crate_name": "mime_guess", - "crate_root": "src/lib.rs", - "srcs": [ - "**/*.rs" - ] - } - }, - { - "BuildScript": { - "crate_name": "build_script_build", - "crate_root": "build.rs", - "srcs": [ - "**/*.rs" - ] - } - } - ], - "library_target_name": "mime_guess", - "common_attrs": { - "compile_data_glob": [ - "**" - ], - "crate_features": { - "common": [ - "default", - "rev-mappings" - ], - "selects": {} - }, - "deps": { - "common": [ - { - "id": "mime 0.3.17", - "target": "mime" - }, - { - "id": "mime_guess 2.0.4", - "target": "build_script_build" - }, - { - "id": "unicase 2.7.0", - "target": "unicase" - } - ], - "selects": {} - }, - "edition": "2015", - "version": "2.0.4" - }, - "build_script_attrs": { - "data_glob": [ - "**" - ], - "deps": { - "common": [ - { - "id": "unicase 2.7.0", - "target": "unicase" - } - ], - "selects": {} - } - }, - "license": "MIT" - }, "minimal-lexical 0.2.1": { "name": "minimal-lexical", "version": "0.2.1", @@ -28178,110 +28699,6 @@ }, "license": "MIT/Apache-2.0" }, - "multer 2.1.0": { - "name": "multer", - "version": "2.1.0", - "repository": { - "Http": { - "url": "https://crates.io/api/v1/crates/multer/2.1.0/download", - "sha256": "01acbdc23469fd8fe07ab135923371d5f5a422fbf9c522158677c8eb15bc51c2" - } - }, - "targets": [ - { - "Library": { - "crate_name": "multer", - "crate_root": "src/lib.rs", - "srcs": [ - "**/*.rs" - ] - } - }, - { - "BuildScript": { - "crate_name": "build_script_build", - "crate_root": "build.rs", - "srcs": [ - "**/*.rs" - ] - } - } - ], - "library_target_name": "multer", - "common_attrs": { - "compile_data_glob": [ - "**" - ], - "crate_features": { - "common": [ - "default" - ], - "selects": {} - }, - "deps": { - "common": [ - { - "id": "bytes 1.5.0", - "target": "bytes" - }, - { - "id": "encoding_rs 0.8.33", - "target": "encoding_rs" - }, - { - "id": "futures-util 0.3.30", - "target": "futures_util" - }, - { - "id": "http 0.2.11", - "target": "http" - }, - { - "id": "httparse 1.8.0", - "target": "httparse" - }, - { - "id": "log 0.4.20", - "target": "log" - }, - { - "id": "memchr 2.7.1", - "target": "memchr" - }, - { - "id": "mime 0.3.17", - "target": "mime" - }, - { - "id": "multer 2.1.0", - "target": "build_script_build" - }, - { - "id": "spin 0.9.8", - "target": "spin" - } - ], - "selects": {} - }, - "edition": "2018", - "version": "2.1.0" - }, - "build_script_attrs": { - "data_glob": [ - "**" - ], - "deps": { - "common": [ - { - "id": "version_check 0.9.4", - "target": "version_check" - } - ], - "selects": {} - } - }, - "license": "MIT" - }, "multimap 0.8.3": { "name": "multimap", "version": "0.8.3", @@ -28324,6 +28741,10 @@ ], "deps": { "common": [ + { + "id": "axum 0.7.4", + "target": "axum" + }, { "id": "base64 0.21.7", "target": "base64" @@ -28407,10 +28828,6 @@ { "id": "url 2.5.0", "target": "url" - }, - { - "id": "warp 0.3.6", - "target": "warp" } ], "selects": {} @@ -37010,36 +37427,6 @@ }, "license": "MIT" }, - "scoped-tls 1.0.1": { - "name": "scoped-tls", - "version": "1.0.1", - "repository": { - "Http": { - "url": "https://crates.io/api/v1/crates/scoped-tls/1.0.1/download", - "sha256": "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" - } - }, - "targets": [ - { - "Library": { - "crate_name": "scoped_tls", - "crate_root": "src/lib.rs", - "srcs": [ - "**/*.rs" - ] - } - } - ], - "library_target_name": "scoped_tls", - "common_attrs": { - "compile_data_glob": [ - "**" - ], - "edition": "2015", - "version": "1.0.1" - }, - "license": "MIT/Apache-2.0" - }, "scoped_threadpool 0.1.9": { "name": "scoped_threadpool", "version": "0.1.9", @@ -37774,6 +38161,7 @@ "crate_features": { "common": [ "default", + "raw_value", "std", "unbounded_depth" ], @@ -37810,6 +38198,49 @@ }, "license": "MIT OR Apache-2.0" }, + "serde_path_to_error 0.1.15": { + "name": "serde_path_to_error", + "version": "0.1.15", + "repository": { + "Http": { + "url": "https://crates.io/api/v1/crates/serde_path_to_error/0.1.15/download", + "sha256": "ebd154a240de39fdebcf5775d2675c204d7c13cf39a4c697be6493c8e734337c" + } + }, + "targets": [ + { + "Library": { + "crate_name": "serde_path_to_error", + "crate_root": "src/lib.rs", + "srcs": [ + "**/*.rs" + ] + } + } + ], + "library_target_name": "serde_path_to_error", + "common_attrs": { + "compile_data_glob": [ + "**" + ], + "deps": { + "common": [ + { + "id": "itoa 1.0.10", + "target": "itoa" + }, + { + "id": "serde 1.0.196", + "target": "serde" + } + ], + "selects": {} + }, + "edition": "2021", + "version": "0.1.15" + }, + "license": "MIT OR Apache-2.0" + }, "serde_qs 0.8.5": { "name": "serde_qs", "version": "0.8.5", @@ -39715,86 +40146,9 @@ ], "crate_features": { "common": [ - "mutex", - "spin_mutex" + "once" ], - "selects": { - "aarch64-apple-darwin": [ - "once" - ], - "aarch64-apple-ios": [ - "once" - ], - "aarch64-apple-ios-sim": [ - "once" - ], - "aarch64-fuchsia": [ - "once" - ], - "aarch64-linux-android": [ - "once" - ], - "aarch64-pc-windows-msvc": [ - "once" - ], - "aarch64-unknown-linux-gnu": [ - "once" - ], - "arm-unknown-linux-gnueabi": [ - "once" - ], - "armv7-linux-androideabi": [ - "once" - ], - "armv7-unknown-linux-gnueabi": [ - "once" - ], - "i686-apple-darwin": [ - "once" - ], - "i686-linux-android": [ - "once" - ], - "i686-pc-windows-msvc": [ - "once" - ], - "i686-unknown-freebsd": [ - "once" - ], - "i686-unknown-linux-gnu": [ - "once" - ], - "thumbv7em-none-eabi": [ - "once" - ], - "thumbv8m.main-none-eabi": [ - "once" - ], - "x86_64-apple-darwin": [ - "once" - ], - "x86_64-apple-ios": [ - "once" - ], - "x86_64-fuchsia": [ - "once" - ], - "x86_64-linux-android": [ - "once" - ], - "x86_64-pc-windows-msvc": [ - "once" - ], - "x86_64-unknown-freebsd": [ - "once" - ], - "x86_64-unknown-linux-gnu": [ - "once" - ], - "x86_64-unknown-none": [ - "once" - ] - } + "selects": {} }, "edition": "2015", "version": "0.9.8" @@ -42329,66 +42683,6 @@ }, "license": "MIT" }, - "tokio-tungstenite 0.20.1": { - "name": "tokio-tungstenite", - "version": "0.20.1", - "repository": { - "Http": { - "url": "https://crates.io/api/v1/crates/tokio-tungstenite/0.20.1/download", - "sha256": "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" - } - }, - "targets": [ - { - "Library": { - "crate_name": "tokio_tungstenite", - "crate_root": "src/lib.rs", - "srcs": [ - "**/*.rs" - ] - } - } - ], - "library_target_name": "tokio_tungstenite", - "common_attrs": { - "compile_data_glob": [ - "**" - ], - "crate_features": { - "common": [ - "connect", - "default", - "handshake", - "stream" - ], - "selects": {} - }, - "deps": { - "common": [ - { - "id": "futures-util 0.3.30", - "target": "futures_util" - }, - { - "id": "log 0.4.20", - "target": "log" - }, - { - "id": "tokio 1.36.0", - "target": "tokio" - }, - { - "id": "tungstenite 0.20.1", - "target": "tungstenite" - } - ], - "selects": {} - }, - "edition": "2018", - "version": "0.20.1" - }, - "license": "MIT" - }, "tokio-util 0.7.10": { "name": "tokio-util", "version": "0.7.10", @@ -43358,96 +43652,6 @@ }, "license": "MIT" }, - "tungstenite 0.20.1": { - "name": "tungstenite", - "version": "0.20.1", - "repository": { - "Http": { - "url": "https://crates.io/api/v1/crates/tungstenite/0.20.1/download", - "sha256": "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" - } - }, - "targets": [ - { - "Library": { - "crate_name": "tungstenite", - "crate_root": "src/lib.rs", - "srcs": [ - "**/*.rs" - ] - } - } - ], - "library_target_name": "tungstenite", - "common_attrs": { - "compile_data_glob": [ - "**" - ], - "crate_features": { - "common": [ - "data-encoding", - "handshake", - "http", - "httparse", - "sha1", - "url" - ], - "selects": {} - }, - "deps": { - "common": [ - { - "id": "byteorder 1.5.0", - "target": "byteorder" - }, - { - "id": "bytes 1.5.0", - "target": "bytes" - }, - { - "id": "data-encoding 2.5.0", - "target": "data_encoding" - }, - { - "id": "http 0.2.11", - "target": "http" - }, - { - "id": "httparse 1.8.0", - "target": "httparse" - }, - { - "id": "log 0.4.20", - "target": "log" - }, - { - "id": "rand 0.8.5", - "target": "rand" - }, - { - "id": "sha1 0.10.6", - "target": "sha1" - }, - { - "id": "thiserror 1.0.56", - "target": "thiserror" - }, - { - "id": "url 2.5.0", - "target": "url" - }, - { - "id": "utf-8 0.7.6", - "target": "utf8" - } - ], - "selects": {} - }, - "edition": "2018", - "version": "0.20.1" - }, - "license": "MIT OR Apache-2.0" - }, "typed-arena 2.0.2": { "name": "typed-arena", "version": "2.0.2", @@ -43624,68 +43828,6 @@ }, "license": "MIT" }, - "unicase 2.7.0": { - "name": "unicase", - "version": "2.7.0", - "repository": { - "Http": { - "url": "https://crates.io/api/v1/crates/unicase/2.7.0/download", - "sha256": "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" - } - }, - "targets": [ - { - "Library": { - "crate_name": "unicase", - "crate_root": "src/lib.rs", - "srcs": [ - "**/*.rs" - ] - } - }, - { - "BuildScript": { - "crate_name": "build_script_build", - "crate_root": "build.rs", - "srcs": [ - "**/*.rs" - ] - } - } - ], - "library_target_name": "unicase", - "common_attrs": { - "compile_data_glob": [ - "**" - ], - "deps": { - "common": [ - { - "id": "unicase 2.7.0", - "target": "build_script_build" - } - ], - "selects": {} - }, - "edition": "2015", - "version": "2.7.0" - }, - "build_script_attrs": { - "data_glob": [ - "**" - ], - "deps": { - "common": [ - { - "id": "version_check 0.9.4", - "target": "version_check" - } - ], - "selects": {} - } - }, - "license": "MIT/Apache-2.0" - }, "unicode-bidi 0.3.15": { "name": "unicode-bidi", "version": "0.3.15", @@ -44087,36 +44229,6 @@ }, "license": "MIT OR Apache-2.0" }, - "utf-8 0.7.6": { - "name": "utf-8", - "version": "0.7.6", - "repository": { - "Http": { - "url": "https://crates.io/api/v1/crates/utf-8/0.7.6/download", - "sha256": "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - } - }, - "targets": [ - { - "Library": { - "crate_name": "utf8", - "crate_root": "src/lib.rs", - "srcs": [ - "**/*.rs" - ] - } - } - ], - "library_target_name": "utf8", - "common_attrs": { - "compile_data_glob": [ - "**" - ], - "edition": "2015", - "version": "0.7.6" - }, - "license": "MIT OR Apache-2.0" - }, "utf8-width 0.1.7": { "name": "utf8-width", "version": "0.1.7", @@ -44448,143 +44560,6 @@ }, "license": "MIT" }, - "warp 0.3.6": { - "name": "warp", - "version": "0.3.6", - "repository": { - "Http": { - "url": "https://crates.io/api/v1/crates/warp/0.3.6/download", - "sha256": "c1e92e22e03ff1230c03a1a8ee37d2f89cd489e2e541b7550d6afad96faed169" - } - }, - "targets": [ - { - "Library": { - "crate_name": "warp", - "crate_root": "src/lib.rs", - "srcs": [ - "**/*.rs" - ] - } - } - ], - "library_target_name": "warp", - "common_attrs": { - "compile_data_glob": [ - "**" - ], - "crate_features": { - "common": [ - "default", - "multer", - "multipart", - "tokio-tungstenite", - "websocket" - ], - "selects": {} - }, - "deps": { - "common": [ - { - "id": "bytes 1.5.0", - "target": "bytes" - }, - { - "id": "futures-channel 0.3.30", - "target": "futures_channel" - }, - { - "id": "futures-util 0.3.30", - "target": "futures_util" - }, - { - "id": "headers 0.3.9", - "target": "headers" - }, - { - "id": "http 0.2.11", - "target": "http" - }, - { - "id": "hyper 0.14.28", - "target": "hyper" - }, - { - "id": "log 0.4.20", - "target": "log" - }, - { - "id": "mime 0.3.17", - "target": "mime" - }, - { - "id": "mime_guess 2.0.4", - "target": "mime_guess" - }, - { - "id": "multer 2.1.0", - "target": "multer" - }, - { - "id": "percent-encoding 2.3.1", - "target": "percent_encoding" - }, - { - "id": "pin-project 1.1.4", - "target": "pin_project" - }, - { - "id": "rustls-pemfile 1.0.4", - "target": "rustls_pemfile" - }, - { - "id": "scoped-tls 1.0.1", - "target": "scoped_tls" - }, - { - "id": "serde 1.0.196", - "target": "serde" - }, - { - "id": "serde_json 1.0.113", - "target": "serde_json" - }, - { - "id": "serde_urlencoded 0.7.1", - "target": "serde_urlencoded" - }, - { - "id": "tokio 1.36.0", - "target": "tokio" - }, - { - "id": "tokio-stream 0.1.14", - "target": "tokio_stream" - }, - { - "id": "tokio-tungstenite 0.20.1", - "target": "tokio_tungstenite" - }, - { - "id": "tokio-util 0.7.10", - "target": "tokio_util" - }, - { - "id": "tower-service 0.3.2", - "target": "tower_service" - }, - { - "id": "tracing 0.1.40", - "target": "tracing" - } - ], - "selects": {} - }, - "edition": "2018", - "version": "0.3.6" - }, - "license": "MIT" - }, "wasi 0.11.0+wasi-snapshot-preview1": { "name": "wasi", "version": "0.11.0+wasi-snapshot-preview1", diff --git a/Cargo.lock b/Cargo.lock index 100f61c4..6fd48035 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -38,7 +38,7 @@ dependencies = [ "encoding_rs", "flate2", "futures-core", - "http", + "http 0.2.11", "httparse", "httpdate", "itoa", @@ -72,7 +72,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d22475596539443685426b6bdadb926ad0ecaefdfc5fb05e5e3441f15463c511" dependencies = [ "bytestring", - "http", + "http 0.2.11", "regex", "serde", "tracing", @@ -635,13 +635,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" dependencies = [ "async-trait", - "axum-core", + "axum-core 0.3.4", "bitflags 1.3.2", "bytes", "futures-util", - "http", - "http-body", - "hyper", + "http 0.2.11", + "http-body 0.4.6", + "hyper 0.14.28", "itoa", "matchit", "memchr", @@ -656,6 +656,40 @@ dependencies = [ "tower-service", ] +[[package]] +name = "axum" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1236b4b292f6c4d6dc34604bb5120d85c3fe1d1aa596bd5cc52ca054d13e7b9e" +dependencies = [ + "async-trait", + "axum-core 0.4.3", + "bytes", + "futures-util", + "http 1.0.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.1.0", + "hyper-util", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "axum-core" version = "0.3.4" @@ -665,14 +699,35 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http", - "http-body", + "http 0.2.11", + "http-body 0.4.6", "mime", "rustversion", "tower-layer", "tower-service", ] +[[package]] +name = "axum-core" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http 1.0.0", + "http-body 1.0.0", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "sync_wrapper", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "backoff" version = "0.4.0" @@ -2701,7 +2756,7 @@ dependencies = [ "derive_builder 0.11.2", "futures-util", "graphql_client", - "http", + "http 0.2.11", "itertools 0.10.5", "log", "percent-encoding", @@ -2810,7 +2865,26 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", + "http 0.2.11", + "indexmap 2.2.2", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31d030e59af851932b72ceebadf4a2b5986dba4c3b99dd2493f8273a0f151943" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 1.0.0", "indexmap 2.2.2", "slab", "tokio", @@ -2863,30 +2937,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "headers" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" -dependencies = [ - "base64 0.21.7", - "bytes", - "headers-core", - "http", - "httpdate", - "mime", - "sha1", -] - -[[package]] -name = "headers-core" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" -dependencies = [ - "http", -] - [[package]] name = "heck" version = "0.4.1" @@ -2961,6 +3011,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http-body" version = "0.4.6" @@ -2968,7 +3029,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http", + "http 0.2.11", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +dependencies = [ + "bytes", + "http 1.0.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41cb79eb393015dadd30fc252023adb0b2400a0caee0fa2a077e6e21a551e840" +dependencies = [ + "bytes", + "futures-util", + "http 1.0.0", + "http-body 1.0.0", "pin-project-lite", ] @@ -2982,7 +3066,7 @@ dependencies = [ "async-channel 1.9.0", "base64 0.13.1", "futures-lite 1.13.0", - "http", + "http 0.2.11", "infer", "pin-project-lite", "rand 0.7.3", @@ -3016,8 +3100,8 @@ dependencies = [ "crossbeam-channel", "form_urlencoded", "futures", - "http", - "hyper", + "http 0.2.11", + "hyper 0.14.28", "log", "once_cell", "regex", @@ -3043,9 +3127,9 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2", - "http", - "http-body", + "h2 0.3.24", + "http 0.2.11", + "http-body 0.4.6", "httparse", "httpdate", "itoa", @@ -3057,6 +3141,25 @@ dependencies = [ "want", ] +[[package]] +name = "hyper" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5aa53871fc917b1a9ed87b683a5d86db645e23acb32c2e0785a353e522fb75" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2 0.4.2", + "http 1.0.0", + "http-body 1.0.0", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "tokio", +] + [[package]] name = "hyper-rustls" version = "0.24.2" @@ -3064,8 +3167,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http", - "hyper", + "http 0.2.11", + "hyper 0.14.28", "log", "rustls", "rustls-native-certs", @@ -3079,7 +3182,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ - "hyper", + "hyper 0.14.28", "pin-project-lite", "tokio", "tokio-io-timeout", @@ -3092,12 +3195,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper", + "hyper 0.14.28", "native-tls", "tokio", "tokio-native-tls", ] +[[package]] +name = "hyper-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" +dependencies = [ + "bytes", + "futures-util", + "http 1.0.0", + "http-body 1.0.0", + "hyper 1.1.0", + "pin-project-lite", + "socket2 0.5.5", + "tokio", +] + [[package]] name = "iana-time-zone" version = "0.1.60" @@ -3160,8 +3279,8 @@ dependencies = [ "ed25519-consensus", "futures-util", "hex", - "http", - "http-body", + "http 0.2.11", + "http-body 0.4.6", "ic-certification 1.3.0", "ic-transport-types", "ic-verify-bls-signature", @@ -3198,7 +3317,7 @@ dependencies = [ "derive_more 0.99.8-alpha.0", "futures", "futures-util", - "hyper", + "hyper 0.14.28", "ic-types", "slog", "tokio", @@ -3258,7 +3377,7 @@ dependencies = [ "async-trait", "backoff", "futures-util", - "hyper", + "hyper 0.14.28", "hyper-rustls", "ic-canister-client-sender", "ic-canonical-state", @@ -3886,7 +4005,7 @@ name = "ic-http-endpoints-metrics" version = "0.9.0" source = "git+https://github.com/dfinity/ic.git?rev=4b3b2ce76c4bde0c1c60fb80b0915931003b7eca#4b3b2ce76c4bde0c1c60fb80b0915931003b7eca" dependencies = [ - "hyper", + "hyper 0.14.28", "ic-async-utils", "ic-config", "ic-crypto-tls-interfaces", @@ -4139,7 +4258,7 @@ dependencies = [ "futures", "futures-util", "gitlab", - "hyper", + "hyper 0.14.28", "ic-agent", "ic-base-types", "ic-canisters", @@ -5593,16 +5712,6 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "mime_guess" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" -dependencies = [ - "mime", - "unicase", -] - [[package]] name = "minimal-lexical" version = "0.2.1" @@ -5657,24 +5766,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "multer" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01acbdc23469fd8fe07ab135923371d5f5a422fbf9c522158677c8eb15bc51c2" -dependencies = [ - "bytes", - "encoding_rs", - "futures-util", - "http", - "httparse", - "log", - "memchr", - "mime", - "spin 0.9.8", - "version_check", -] - [[package]] name = "multimap" version = "0.8.3" @@ -5685,6 +5776,7 @@ checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" name = "multiservice-discovery" version = "0.2.1" dependencies = [ + "axum 0.7.4", "base64 0.21.7", "clap 4.4.18", "crossbeam", @@ -5709,7 +5801,6 @@ dependencies = [ "slog-term", "tokio", "url", - "warp", ] [[package]] @@ -7054,10 +7145,10 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2", - "http", - "http-body", - "hyper", + "h2 0.3.24", + "http 0.2.11", + "http-body 0.4.6", + "hyper 0.14.28", "hyper-rustls", "hyper-tls", "ipnet", @@ -7327,12 +7418,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "scoped-tls" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" - [[package]] name = "scoped_threadpool" version = "0.1.9" @@ -7476,6 +7561,16 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_path_to_error" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebd154a240de39fdebcf5775d2675c204d7c13cf39a4c697be6493c8e734337c" +dependencies = [ + "itoa", + "serde", +] + [[package]] name = "serde_qs" version = "0.8.5" @@ -7576,7 +7671,7 @@ dependencies = [ "crossbeam", "crossbeam-channel", "futures", - "hyper", + "hyper 0.14.28", "ic-interfaces-registry", "ic-metrics", "ic-protobuf", @@ -8363,18 +8458,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-tungstenite" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" -dependencies = [ - "futures-util", - "log", - "tokio", - "tungstenite", -] - [[package]] name = "tokio-util" version = "0.7.10" @@ -8425,13 +8508,13 @@ checksum = "d560933a0de61cf715926b9cac824d4c883c2c43142f787595e48280c40a1d0e" dependencies = [ "async-stream", "async-trait", - "axum", + "axum 0.6.20", "base64 0.21.7", "bytes", - "h2", - "http", - "http-body", - "hyper", + "h2 0.3.24", + "http 0.2.11", + "http-body 0.4.6", + "hyper 0.14.28", "hyper-timeout", "percent-encoding", "pin-project", @@ -8568,25 +8651,6 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" -[[package]] -name = "tungstenite" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http", - "httparse", - "log", - "rand 0.8.5", - "sha1", - "thiserror", - "url", - "utf-8", -] - [[package]] name = "typed-arena" version = "2.0.2" @@ -8616,15 +8680,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "unicase" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] - [[package]] name = "unicode-bidi" version = "0.3.15" @@ -8703,12 +8758,6 @@ dependencies = [ "serde", ] -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - [[package]] name = "utf8-width" version = "0.1.7" @@ -8770,37 +8819,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "warp" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e92e22e03ff1230c03a1a8ee37d2f89cd489e2e541b7550d6afad96faed169" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "headers", - "http", - "hyper", - "log", - "mime", - "mime_guess", - "multer", - "percent-encoding", - "pin-project", - "rustls-pemfile", - "scoped-tls", - "serde", - "serde_json", - "serde_urlencoded", - "tokio", - "tokio-stream", - "tokio-tungstenite", - "tokio-util", - "tower-service", - "tracing", -] - [[package]] name = "wasi" version = "0.9.0+wasi-snapshot-preview1" @@ -9190,7 +9208,7 @@ dependencies = [ "futures", "futures-timer", "http-types", - "hyper", + "hyper 0.14.28", "log", "once_cell", "regex", diff --git a/rs/ic-observability/multiservice-discovery/Cargo.toml b/rs/ic-observability/multiservice-discovery/Cargo.toml index 4c86b1ea..dd39a512 100644 --- a/rs/ic-observability/multiservice-discovery/Cargo.toml +++ b/rs/ic-observability/multiservice-discovery/Cargo.toml @@ -29,5 +29,5 @@ slog-async = { workspace = true } slog-term = { workspace = true } tokio = { workspace = true } url = { workspace = true } -warp = { workspace = true } futures.workspace = true +axum = "0.7.4" \ No newline at end of file diff --git a/rs/ic-observability/multiservice-discovery/src/definition.rs b/rs/ic-observability/multiservice-discovery/src/definition.rs index c5d6e74a..c10199be 100644 --- a/rs/ic-observability/multiservice-discovery/src/definition.rs +++ b/rs/ic-observability/multiservice-discovery/src/definition.rs @@ -78,7 +78,7 @@ pub struct RunningDefinition { } pub struct TestDefinition { - pub(crate) running_def: RunningDefinition + pub(crate) running_def: RunningDefinition, } impl TestDefinition { @@ -86,11 +86,11 @@ impl TestDefinition { let (_, stop_signal) = crossbeam::channel::bounded::<()>(0); let ender: Arc>> = Arc::new(Mutex::new(None)); Self { - running_def: RunningDefinition{ + running_def: RunningDefinition { definition, stop_signal, - ender - } + ender, + }, } } @@ -102,10 +102,12 @@ impl TestDefinition { // E.g. telemetry should collect this. // return; // } - let _ = self.running_def.definition.ic_discovery + let _ = self + .running_def + .definition + .ic_discovery .load_new_ics(self.running_def.definition.log.clone()); } - } impl Definition { @@ -256,7 +258,6 @@ impl RunningDefinition { } } - // Syncs the registry and keeps running, syncing as new // registry versions come in. async fn run(&self) { @@ -419,7 +420,10 @@ impl DefinitionsSupervisor { ic_names_to_add.insert(ic_name); } - if !self.allow_mercury_deletion && !ic_names_to_add.contains(&Network::Mainnet.legacy_name()) { + if !self.allow_mercury_deletion + && !ic_names_to_add.contains(&Network::Mainnet.legacy_name()) + && start_mode == StartMode::ReplaceExistingDefinitions + { error .errors .push(StartDefinitionError::DeletionDisallowed(Network::Mainnet.legacy_name())) diff --git a/rs/ic-observability/multiservice-discovery/src/server_handlers/add_boundary_node_to_definition_handler.rs b/rs/ic-observability/multiservice-discovery/src/server_handlers/add_boundary_node_to_definition_handler.rs index 898d2e0e..fd0bfa80 100644 --- a/rs/ic-observability/multiservice-discovery/src/server_handlers/add_boundary_node_to_definition_handler.rs +++ b/rs/ic-observability/multiservice-discovery/src/server_handlers/add_boundary_node_to_definition_handler.rs @@ -1,18 +1,12 @@ -use slog::Logger; +use axum::extract::State; +use axum::http::StatusCode; +use axum::Json; use std::error::Error; use std::fmt::{Display, Error as FmtError, Formatter}; -use warp::Reply; - -use crate::definition::DefinitionsSupervisor; use crate::server_handlers::dto::BoundaryNodeDto; -use crate::server_handlers::{bad_request, not_found, ok, WebResult}; -#[derive(Clone)] -pub(super) struct AddBoundaryNodeToDefinitionBinding { - pub(crate) supervisor: DefinitionsSupervisor, - pub(crate) log: Logger, -} +use super::{bad_request, not_found, ok, Server}; #[derive(Debug)] @@ -29,28 +23,33 @@ impl Display for DefinitionNotFound { } pub(super) async fn add_boundary_node( - boundary_node: BoundaryNodeDto, - binding: AddBoundaryNodeToDefinitionBinding, -) -> WebResult { - let log = binding.log.clone(); + State(binding): State, + Json(boundary_node): Json, +) -> Result { let name = boundary_node.name.clone(); let ic_name = boundary_node.ic_name.clone(); - let rej: String = format!("Definition {} could not be added", name); + let rejection = format!("Definition {} could not be added", name); let mut definitions = binding.supervisor.definitions.lock().await; let running_definition = match definitions.get_mut(&ic_name) { Some(d) => d, - None => return not_found(log, rej, DefinitionNotFound { ic_name }), + None => { + return not_found( + binding.log, + format!("Couldn't find definition: '{}'", ic_name), + DefinitionNotFound { ic_name }, + ) + } }; let bn = match boundary_node.try_into_boundary_node() { Ok(bn) => bn, - Err(e) => return bad_request(log, rej, e), + Err(e) => return bad_request(binding.log, rejection, e), }; match running_definition.add_boundary_node(bn).await { - Ok(()) => ok(log, format!("Definition {} added successfully", name)), - Err(e) => bad_request(log, rej, e), + Ok(()) => ok(binding.log, format!("Definition {} added successfully", name)), + Err(e) => bad_request(binding.log, rejection, e), } } diff --git a/rs/ic-observability/multiservice-discovery/src/server_handlers/add_definition_handler.rs b/rs/ic-observability/multiservice-discovery/src/server_handlers/add_definition_handler.rs index 7b71e600..b5d43bf5 100644 --- a/rs/ic-observability/multiservice-discovery/src/server_handlers/add_definition_handler.rs +++ b/rs/ic-observability/multiservice-discovery/src/server_handlers/add_definition_handler.rs @@ -1,25 +1,16 @@ -use slog::Logger; +use axum::extract::State; +use axum::http::StatusCode; +use axum::Json; -use std::path::PathBuf; -use std::time::Duration; - -use super::{bad_request, ok, WebResult}; -use warp::Reply; - -use crate::definition::{DefinitionsSupervisor, StartMode}; +use crate::definition::StartMode; use crate::server_handlers::dto::DefinitionDto; -#[derive(Clone)] -pub(super) struct AddDefinitionBinding { - pub(crate) supervisor: DefinitionsSupervisor, - pub(crate) log: Logger, - pub(crate) registry_path: PathBuf, - pub(crate) poll_interval: Duration, - pub(crate) registry_query_timeout: Duration, -} +use super::{bad_request, ok, Server}; -pub(super) async fn add_definition(definition: DefinitionDto, binding: AddDefinitionBinding) -> WebResult { - let log = binding.log.clone(); +pub(super) async fn add_definition( + State(binding): State, + Json(definition): Json, +) -> Result { let dname = definition.name.clone(); let rej = format!("Definition {} could not be added", dname); let new_definition = match definition @@ -32,14 +23,14 @@ pub(super) async fn add_definition(definition: DefinitionDto, binding: AddDefini .await { Ok(def) => def, - Err(e) => return bad_request(log, rej, e), + Err(e) => return bad_request(binding.log, rej, e), }; match binding .supervisor .start(vec![new_definition], StartMode::AddToDefinitions) .await { - Ok(()) => ok(log, format!("Definition {} added successfully", dname)), - Err(e) => bad_request(log, rej, e.errors.into_iter().next().unwrap()), + Ok(()) => ok(binding.log, format!("Definition {} added successfully", dname)), + Err(e) => bad_request(binding.log, rej, e), } } diff --git a/rs/ic-observability/multiservice-discovery/src/server_handlers/delete_definition_handler.rs b/rs/ic-observability/multiservice-discovery/src/server_handlers/delete_definition_handler.rs index 89f14251..b78072aa 100644 --- a/rs/ic-observability/multiservice-discovery/src/server_handlers/delete_definition_handler.rs +++ b/rs/ic-observability/multiservice-discovery/src/server_handlers/delete_definition_handler.rs @@ -1,26 +1,21 @@ -use crate::definition::DefinitionsSupervisor; use crate::definition::StopDefinitionError; -use slog::Logger; -use warp::Reply; +use axum::extract::{Path, State}; +use axum::http::StatusCode; -use super::{forbidden, not_found, ok, WebResult}; +use super::{forbidden, not_found, Server}; -#[derive(Clone)] -pub(super) struct DeleteDefinitionBinding { - pub(crate) supervisor: DefinitionsSupervisor, - pub(crate) log: Logger, -} - -pub(super) async fn delete_definition(name: String, binding: DeleteDefinitionBinding) -> WebResult { - let rej = format!("Definition {} could not be deleted", name); +pub(super) async fn delete_definition( + Path(name): Path, + State(binding): State, +) -> Result { match binding.supervisor.stop(vec![name.clone()]).await { - Ok(_) => ok(binding.log, format!("Deleted definition {}", name.clone())), + Ok(_) => Ok(format!("Deleted definition {}", name.clone())), Err(e) => match e.errors.into_iter().next().unwrap() { StopDefinitionError::DoesNotExist(e) => { - not_found(binding.log, "FUCK".to_string(), StopDefinitionError::DoesNotExist(e)) + not_found(binding.log, format!("Definition with name '{}' doesn't exist", name), e) } StopDefinitionError::DeletionDisallowed(e) => { - forbidden(binding.log, rej, StopDefinitionError::DeletionDisallowed(e)) + forbidden(binding.log, "That definition cannot be deleted".to_string(), e) } }, } diff --git a/rs/ic-observability/multiservice-discovery/src/server_handlers/export_prometheus_config_handler.rs b/rs/ic-observability/multiservice-discovery/src/server_handlers/export_prometheus_config_handler.rs index f58aa598..612e7041 100644 --- a/rs/ic-observability/multiservice-discovery/src/server_handlers/export_prometheus_config_handler.rs +++ b/rs/ic-observability/multiservice-discovery/src/server_handlers/export_prometheus_config_handler.rs @@ -1,12 +1,12 @@ use crate::definition::RunningDefinition; -use super::WebResult; +use super::{ok, Server}; +use axum::extract::State; +use axum::http::StatusCode; use multiservice_discovery_shared::builders::prometheus_config_structure::{map_target_group, PrometheusStaticConfig}; use multiservice_discovery_shared::contracts::target::{map_to_target_dto, TargetDto}; use service_discovery::job_types::{JobType, NodeOS}; -use std::{collections::BTreeMap, sync::Arc}; -use tokio::sync::Mutex; -use warp::reply::Reply; +use std::collections::BTreeMap; pub fn serialize_definitions_to_prometheus_config(definitions: BTreeMap) -> (usize, String) { let mut ic_node_targets: Vec = vec![]; @@ -80,20 +80,12 @@ pub fn serialize_definitions_to_prometheus_config(definitions: BTreeMap>>, -} - -pub(super) async fn export_prometheus_config(binding: ExportDefinitionConfigBinding) -> WebResult { - let definitions = binding.definitions_ref.lock().await; +pub(super) async fn export_prometheus_config(State(binding): State) -> Result { + let definitions = binding.supervisor.definitions.lock().await; let (targets_len, text) = serialize_definitions_to_prometheus_config(definitions.clone()); - Ok(warp::reply::with_status( - text, - if targets_len > 0 { - warp::http::StatusCode::OK - } else { - warp::http::StatusCode::NOT_FOUND - }, - )) + if targets_len > 0 { + ok(binding.log, text) + } else { + Err((StatusCode::NOT_FOUND, "No targets found".to_string())) + } } diff --git a/rs/ic-observability/multiservice-discovery/src/server_handlers/export_targets_handler.rs b/rs/ic-observability/multiservice-discovery/src/server_handlers/export_targets_handler.rs index c0cf0c76..3aeeacbd 100644 --- a/rs/ic-observability/multiservice-discovery/src/server_handlers/export_targets_handler.rs +++ b/rs/ic-observability/multiservice-discovery/src/server_handlers/export_targets_handler.rs @@ -1,20 +1,15 @@ -use crate::definition::RunningDefinition; - -use super::WebResult; +use axum::{extract::State, http::StatusCode, Json}; use ic_types::{NodeId, PrincipalId}; use multiservice_discovery_shared::contracts::target::{map_to_target_dto, TargetDto}; use service_discovery::job_types::{JobType, NodeOS}; -use std::{collections::BTreeMap, sync::Arc}; -use tokio::sync::Mutex; -use warp::reply::Reply; +use std::collections::BTreeMap; -#[derive(Clone)] -pub(super) struct ExportTargetsBinding { - pub(crate) definitions_ref: Arc>>, -} +use super::Server; -pub(super) async fn export_targets(binding: ExportTargetsBinding) -> WebResult { - let definitions = binding.definitions_ref.lock().await; +pub(super) async fn export_targets( + State(binding): State, +) -> Result>, (StatusCode, String)> { + let definitions = binding.supervisor.definitions.lock().await; let mut ic_node_targets: Vec = vec![]; @@ -77,12 +72,9 @@ pub(super) async fn export_targets(binding: ExportTargetsBinding) -> WebResult WebResult { - let definitions = supervisor.definitions.lock().await; +use super::Server; - let list = &definitions +pub(super) async fn get_definitions( + State(supervisor): State, +) -> Result>, (StatusCode, String)> { + let definitions = supervisor.supervisor.definitions.lock().await; + + let list = definitions .iter() .map(|(_, d)| { let x = &d.definition; x.into() }) .collect::>(); - Ok(json(list)) + Ok(Json(list)) } diff --git a/rs/ic-observability/multiservice-discovery/src/server_handlers/mod.rs b/rs/ic-observability/multiservice-discovery/src/server_handlers/mod.rs index 062dc20f..0c1eaa80 100644 --- a/rs/ic-observability/multiservice-discovery/src/server_handlers/mod.rs +++ b/rs/ic-observability/multiservice-discovery/src/server_handlers/mod.rs @@ -2,22 +2,17 @@ use std::fmt::Display; use std::path::PathBuf; use std::time::Duration; -use slog::{info, Logger}; -use warp::reply::WithStatus; -use warp::{Filter, Rejection}; +use axum::http::StatusCode; +use axum::routing::{delete, get, post, put}; +use axum::Router; +use slog::{debug, info, Logger}; use crate::definition::DefinitionsSupervisor; use crate::server_handlers::add_boundary_node_to_definition_handler::add_boundary_node; -use crate::server_handlers::add_boundary_node_to_definition_handler::AddBoundaryNodeToDefinitionBinding; -use crate::server_handlers::add_definition_handler::{ - add_definition, AddDefinitionBinding, AddDefinitionBinding as ReplaceDefinitionsBinding, -}; -use crate::server_handlers::delete_definition_handler::{delete_definition, DeleteDefinitionBinding}; -use crate::server_handlers::export_prometheus_config_handler::{ - export_prometheus_config, ExportDefinitionConfigBinding, -}; +use crate::server_handlers::add_definition_handler::add_definition; +use crate::server_handlers::delete_definition_handler::delete_definition; +use crate::server_handlers::export_prometheus_config_handler::export_prometheus_config; use crate::server_handlers::export_targets_handler::export_targets; -use crate::server_handlers::export_targets_handler::ExportTargetsBinding; use crate::server_handlers::get_definition_handler::get_definitions; use crate::server_handlers::replace_definitions_handler::replace_definitions; @@ -30,47 +25,37 @@ mod export_targets_handler; mod get_definition_handler; mod replace_definitions_handler; -pub type WebResult = Result; +pub type WebResult = Result; -pub(crate) fn ok(log: Logger, message: String) -> WebResult> { - info!(log, "{}", message); - let r: WithStatus = warp::reply::with_status(message, warp::http::StatusCode::OK); - let rr: WebResult> = Ok(r); - rr +pub(crate) fn ok(log: Logger, message: String) -> WebResult { + debug!(log, "{}", message); + Ok(message) } -pub(crate) fn bad_request(log: Logger, message: String, err: T) -> WebResult> +pub(crate) fn bad_request(log: Logger, message: String, err: T) -> WebResult where T: Display, { - info!(log, "{}: {}", message, err); - Ok(warp::reply::with_status( - format!("{}: {}", message, err), - warp::http::StatusCode::BAD_REQUEST, - )) + debug!(log, "{}: {}", message, err); + Err((StatusCode::BAD_REQUEST, format!("{}: {}", message, err))) } -pub(crate) fn not_found(log: Logger, message: String, err: T) -> WebResult> +pub(crate) fn not_found(log: Logger, message: String, err: T) -> WebResult where T: Display, { info!(log, "{}: {}", message, err); - Ok(warp::reply::with_status( - format!("{}: {}", message, err), - warp::http::StatusCode::NOT_FOUND, - )) + Err((StatusCode::NOT_FOUND, format!("{}: {}", message, err))) } -pub(crate) fn forbidden(log: Logger, message: String, err: T) -> WebResult> +pub(crate) fn forbidden(log: Logger, message: String, err: T) -> WebResult where T: Display, { info!(log, "{}: {}", message, err); - Ok(warp::reply::with_status( - format!("{}: {}", message, err), - warp::http::StatusCode::FORBIDDEN, - )) + Err((StatusCode::FORBIDDEN, format!("{}: {}", message, err))) } +#[derive(Clone)] pub(crate) struct Server { log: Logger, supervisor: DefinitionsSupervisor, @@ -96,90 +81,24 @@ impl Server { } } pub(crate) async fn run(self, recv: tokio::sync::oneshot::Receiver<()>) { - let poll_interval = self.poll_interval; - let registry_query_timeout = self.registry_query_timeout; - - let binding = AddDefinitionBinding { - supervisor: self.supervisor.clone(), - log: self.log.clone(), - poll_interval, - registry_query_timeout, - registry_path: self.registry_path.clone(), - }; - let add = warp::path::end() - .and(warp::post()) - .and(warp::body::json()) - .and(warp::any().map(move || binding.clone())) - .and_then(add_definition); - - let binding = ReplaceDefinitionsBinding { - supervisor: self.supervisor.clone(), - log: self.log.clone(), - poll_interval, - registry_query_timeout, - registry_path: self.registry_path.clone(), - }; - let put = warp::path::end() - .and(warp::put()) - .and(warp::body::json()) - .and(warp::any().map(move || binding.clone())) - .and_then(replace_definitions); - - let get_items = self.supervisor.clone(); - let get = warp::path::end() - .and(warp::get()) - .and(warp::any().map(move || get_items.clone())) - .and_then(get_definitions); - - let binding = DeleteDefinitionBinding { - supervisor: self.supervisor.clone(), - log: self.log.clone(), - }; - let delete = warp::path!(String) - .and(warp::delete()) - .and(warp::any().map(move || binding.clone())) - .and_then(delete_definition); - - let binding = ExportDefinitionConfigBinding { - definitions_ref: self.supervisor.definitions.clone(), - }; - let export_prometheus = warp::path!("prom" / "targets") - .and(warp::get()) - .and(warp::any().map(move || binding.clone())) - .and_then(export_prometheus_config); - - let binding = ExportTargetsBinding { - definitions_ref: self.supervisor.definitions.clone(), - }; - let export_targets = warp::path!("targets") - .and(warp::get()) - .and(warp::any().map(move || binding.clone())) - .and_then(export_targets); - - let binding = AddBoundaryNodeToDefinitionBinding { - supervisor: self.supervisor.clone(), - log: self.log.clone(), - }; - let add_boundary_node = warp::path!("add_boundary_node") - .and(warp::post()) - .and(warp::body::json()) - .and(warp::any().map(move || binding.clone())) - .and_then(add_boundary_node); - - let routes = add - .or(get) - .or(delete) - .or(put) - .or(export_prometheus) - .or(export_targets) - .or(add_boundary_node); - - let routes = routes.with(warp::log("multiservice_discovery")); - let (_, server) = warp::serve(routes).bind_with_graceful_shutdown(([0, 0, 0, 0], 8000), async { - recv.await.ok(); - }); + let app = Router::new() + .route("/", post(add_definition)) + .route("/", put(replace_definitions)) + .route("/", get(get_definitions)) + .route("/:name", delete(delete_definition)) + .route("/prom/targets", get(export_prometheus_config)) + .route("/targets", get(export_targets)) + .route("/add_boundary_node", post(add_boundary_node)) + .with_state(self.clone()); + + let listener = tokio::net::TcpListener::bind("0.0.0.0:8000").await.unwrap(); info!(self.log, "Server started on port {}", 8000); - server.await; + axum::serve(listener, app) + .with_graceful_shutdown(async move { + recv.await.unwrap(); + }) + .await + .unwrap(); info!(self.log, "Server stopped"); } } diff --git a/rs/ic-observability/multiservice-discovery/src/server_handlers/replace_definitions_handler.rs b/rs/ic-observability/multiservice-discovery/src/server_handlers/replace_definitions_handler.rs index 9032266c..f9ec6e33 100644 --- a/rs/ic-observability/multiservice-discovery/src/server_handlers/replace_definitions_handler.rs +++ b/rs/ic-observability/multiservice-discovery/src/server_handlers/replace_definitions_handler.rs @@ -1,18 +1,17 @@ +use axum::extract::State; +use axum::http::StatusCode; +use axum::Json; use futures::future::join_all; -use warp::Reply; - -use super::{bad_request, ok, WebResult}; use crate::definition::{Definition, StartMode}; use crate::server_handlers::dto::{BadDtoError, DefinitionDto}; -use crate::server_handlers::AddDefinitionBinding as ReplaceDefinitionsBinding; + +use super::{bad_request, ok, Server, WebResult}; pub(super) async fn replace_definitions( - definitions: Vec, - binding: ReplaceDefinitionsBinding, -) -> WebResult { - let log = binding.log.clone(); - let rej = "Definitions could not be changed".to_string(); + State(binding): State, + Json(definitions): Json>, +) -> WebResult { let dnames = definitions .iter() .map(|d| d.name.clone()) @@ -37,14 +36,13 @@ pub(super) async fn replace_definitions( let errors: Vec<_> = errors.into_iter().map(Result::unwrap_err).collect(); if !errors.is_empty() { - return bad_request( - log, - rej, + return Err(( + StatusCode::BAD_REQUEST, format!( ":\n * {}", errors.iter().map(|e| e.to_string()).collect::>().join("\n * ") ), - ); + )); } let new_definitions: Vec<_> = new_definitions.into_iter().map(Result::unwrap).collect(); @@ -53,7 +51,10 @@ pub(super) async fn replace_definitions( .start(new_definitions, StartMode::ReplaceExistingDefinitions) .await { - Ok(_) => ok(log, format!("Added new definitions {} to existing ones", dnames)), - Err(e) => bad_request(log, rej, format!(":\n{}", e)), + Ok(_) => ok( + binding.log, + format!("Added new definitions {} to existing ones", dnames), + ), + Err(e) => bad_request(binding.log, format!(":\n{}", e), e), } }