From 3e4da0ce67680524cdbff72bdb97b04fea8fd8d2 Mon Sep 17 00:00:00 2001 From: Pavel Kirilin Date: Tue, 7 Mar 2023 04:35:58 +0400 Subject: [PATCH 1/7] Updated deps, fixed CLI args. (#114) --- Cargo.lock | 1725 +++++++++++------- Cargo.toml | 39 +- docs/configuration.md | 18 +- docs/hooks.md | 28 +- src/config.rs | 123 +- src/errors.rs | 10 +- src/info_storages/models/file_info.rs | 3 +- src/info_storages/redis_info_storage.rs | 13 +- src/main.rs | 1 + src/notifiers/amqp_notifier.rs | 34 +- src/notifiers/dir_notifier.rs | 3 +- src/notifiers/models/notification_manager.rs | 9 +- src/protocol/core/get_info.rs | 4 +- src/protocol/creation/routes.rs | 19 +- src/utils/hashes.rs | 11 +- 15 files changed, 1281 insertions(+), 759 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3327261..146a9ec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -16,14 +16,14 @@ dependencies = [ "memchr", "pin-project-lite", "tokio", - "tokio-util 0.7.4", + "tokio-util", ] [[package]] name = "actix-cors" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "684a6ce1562a5fcca49bc9302896c63547eea78a1e405e837e7416affd8b6eb9" +checksum = "b340e9cfa5b08690aae90fb61beb44e9b06f44fe3d0f93781aaa58cfba86245e" dependencies = [ "actix-utils", "actix-web", @@ -59,16 +59,16 @@ dependencies = [ [[package]] name = "actix-http" -version = "3.2.2" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c83abf9903e1f0ad9973cc4f7b9767fd5a03a583f51a5b7a339e07987cd2724" +checksum = "c2079246596c18b4a33e274ae10c0e50613f4d32a4198e09c7b93771013fed74" dependencies = [ "actix-codec", "actix-rt", "actix-service", "actix-utils", - "ahash", - "base64 0.13.0", + "ahash 0.8.3", + "base64 0.21.0", "bitflags", "brotli", "bytes", @@ -81,7 +81,7 @@ dependencies = [ "http", "httparse", "httpdate", - "itoa 1.0.4", + "itoa", "language-tags", "local-channel", "mime", @@ -90,6 +90,8 @@ dependencies = [ "rand 0.8.5", "sha1 0.10.5", "smallvec", + "tokio", + "tokio-util", "tracing", "zstd", ] @@ -119,9 +121,9 @@ dependencies = [ [[package]] name = "actix-rt" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ea16c295198e958ef31930a6ef37d0fb64e9ca3b6116e6b93a8bdae96ee1000" +checksum = "15265b6b8e2347670eb363c47fc8c75208b4a4994b27192f345fcbe707804f3e" dependencies = [ "actix-macros", "futures-core", @@ -130,16 +132,16 @@ dependencies = [ [[package]] name = "actix-server" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0da34f8e659ea1b077bb4637948b815cd3768ad5a188fdcd74ff4d84240cd824" +checksum = "3e8613a75dd50cc45f473cee3c34d59ed677c0f7b44480ce3b8247d7dc519327" dependencies = [ "actix-rt", "actix-service", "actix-utils", "futures-core", "futures-util", - "mio 0.8.4", + "mio", "num_cpus", "socket2", "tokio", @@ -159,9 +161,9 @@ dependencies = [ [[package]] name = "actix-utils" -version = "3.0.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e491cbaac2e7fc788dfff99ff48ef317e23b3cf63dbaf7aaab6418f40f92aa94" +checksum = "88a1dcdff1466e3c2488e1cb5c36a71822750ad43839937f85d2f4d9f8b705d8" dependencies = [ "local-waker", "pin-project-lite", @@ -169,9 +171,9 @@ dependencies = [ [[package]] name = "actix-web" -version = "4.2.1" +version = "4.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d48f7b6534e06c7bfc72ee91db7917d4af6afe23e7d223b51e68fffbb21e96b9" +checksum = "cd3cb42f9566ab176e1ef0b8b3a896529062b4efc6be0123046095914c4c1c96" dependencies = [ "actix-codec", "actix-http", @@ -182,7 +184,7 @@ dependencies = [ "actix-service", "actix-utils", "actix-web-codegen", - "ahash", + "ahash 0.7.6", "bytes", "bytestring", "cfg-if", @@ -192,7 +194,7 @@ dependencies = [ "futures-core", "futures-util", "http", - "itoa 1.0.4", + "itoa", "language-tags", "log", "mime", @@ -204,15 +206,15 @@ dependencies = [ "serde_urlencoded", "smallvec", "socket2", - "time 0.3.15", + "time 0.3.20", "url", ] [[package]] name = "actix-web-codegen" -version = "4.1.0" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fa9362663c8643d67b2d5eafba49e4cb2c8a053a29ed00a0bea121f17c76b13" +checksum = "2262160a7ae29e3415554a3f1fc04c764b1540c116aa524683208078b7a75bc9" dependencies = [ "actix-router", "proc-macro2", @@ -249,11 +251,23 @@ dependencies = [ "version_check", ] +[[package]] +name = "ahash" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +dependencies = [ + "cfg-if", + "getrandom", + "once_cell", + "version_check", +] + [[package]] name = "aho-corasick" -version = "0.7.19" +version = "0.7.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e" +checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" dependencies = [ "memchr", ] @@ -275,22 +289,23 @@ dependencies = [ [[package]] name = "amq-protocol" -version = "6.1.0" +version = "7.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3b51c409a2b30e48826a593d56a26a43f37bf3df682821e55cd108e24de9ce7" +checksum = "acc7cad07d1b4533fcb46f0819a6126fa201fd0385469aba75e405424f3fe009" dependencies = [ "amq-protocol-tcp", "amq-protocol-types", "amq-protocol-uri", "cookie-factory", "nom", + "serde", ] [[package]] name = "amq-protocol-tcp" -version = "6.1.0" +version = "7.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9797cd3a8f1491e4828818341aea5e1378029ec89dc2422cd85d62715f913080" +checksum = "5d8b20aba8c35a0b885e1e978eff456ced925730a4e012e63e4ff89a1deb602b" dependencies = [ "amq-protocol-uri", "tcp-stream", @@ -299,9 +314,9 @@ dependencies = [ [[package]] name = "amq-protocol-types" -version = "6.1.0" +version = "7.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "028cb766932137535fe8a320245e385bac379506d7e9e3d0375be069bb6fb0de" +checksum = "e245e0e9083b6a6db5f8c10013074cb382266eb9e2a37204d19c651b8d3b8114" dependencies = [ "cookie-factory", "nom", @@ -311,10 +326,11 @@ dependencies = [ [[package]] name = "amq-protocol-uri" -version = "6.1.0" +version = "7.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b08059afa9495f674408891c5eaee50c5eca3532598c90532c1856990b91da96" +checksum = "56987108bf48d2eb500cae8896cd9291564eedd8744776ecc5c3338a8b2ca5f8" dependencies = [ + "amq-protocol-types", "percent-encoding", "url", ] @@ -328,15 +344,6 @@ dependencies = [ "libc", ] -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - [[package]] name = "arrayvec" version = "0.7.2" @@ -349,6 +356,98 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "619743e34b5ba4e9703bba34deac3427c72507c7159f5fd030aea8cac0cfe341" +[[package]] +name = "async-channel" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" +dependencies = [ + "concurrent-queue", + "event-listener", + "futures-core", +] + +[[package]] +name = "async-executor" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17adb73da160dfb475c183343c8cccd80721ea5a605d3eb57125f0a7b7a92d0b" +dependencies = [ + "async-lock", + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "slab", +] + +[[package]] +name = "async-global-executor" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776" +dependencies = [ + "async-channel", + "async-executor", + "async-io", + "async-lock", + "blocking", + "futures-lite", + "once_cell", +] + +[[package]] +name = "async-global-executor-trait" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33dd14c5a15affd2abcff50d84efd4009ada28a860f01c14f9d654f3e81b3f75" +dependencies = [ + "async-global-executor", + "async-trait", + "executor-trait", +] + +[[package]] +name = "async-io" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c374dda1ed3e7d8f0d9ba58715f924862c63eae6849c92d3a18e7fbde9e2794" +dependencies = [ + "async-lock", + "autocfg", + "concurrent-queue", + "futures-lite", + "libc", + "log", + "parking", + "polling", + "slab", + "socket2", + "waker-fn", + "windows-sys 0.42.0", +] + +[[package]] +name = "async-lock" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" +dependencies = [ + "event-listener", +] + +[[package]] +name = "async-reactor-trait" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6012d170ad00de56c9ee354aef2e358359deb1ec504254e0e5a3774771de0e" +dependencies = [ + "async-io", + "async-trait", + "futures-core", + "reactor-trait", +] + [[package]] name = "async-task" version = "4.3.0" @@ -357,9 +456,9 @@ checksum = "7a40729d2133846d9ed0ea60a8b9541bccddab49cd30f0715a1da672fe9a2524" [[package]] name = "async-trait" -version = "0.1.58" +version = "0.1.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e805d94e6b5001b651426cf4cd446b1ab5f319d27bab5c644f61de0a804360c" +checksum = "b84f9ebcc6c1f5b8cb160f6990096a5c127f423fcb6e1ccc46c370cbdfb75dfc" dependencies = [ "proc-macro2", "quote", @@ -375,6 +474,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "atomic-waker" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "debc29dde2e69f9e47506b525f639ed42300fc014a3e007832592448fa8e4599" + [[package]] name = "attohttpc" version = "0.19.1" @@ -397,7 +502,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi", + "hermit-abi 0.1.19", "libc", "winapi", ] @@ -420,7 +525,7 @@ dependencies = [ "serde", "serde-xml-rs", "thiserror", - "time 0.3.15", + "time 0.3.20", "url", ] @@ -441,21 +546,56 @@ checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" [[package]] name = "base64" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5" +checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" [[package]] name = "base64ct" -version = "1.5.3" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bb8" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1627eccf3aa91405435ba240be23513eeca466b5dc33866422672264de061582" +dependencies = [ + "async-trait", + "futures-channel", + "futures-util", + "parking_lot 0.12.1", + "tokio", +] + +[[package]] +name = "bb8-lapin" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf" +checksum = "5441692a6e0820dd92853f61ab61dd3a44681d3606a4fbefe67cfdad7093a0c9" +dependencies = [ + "async-trait", + "bb8", + "lapin", +] + +[[package]] +name = "bb8-redis" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8310da711a26fa0326202261abd73a414340f3ec957f63927a055511a01d7fb2" +dependencies = [ + "async-trait", + "bb8", + "redis", +] [[package]] name = "bigdecimal" @@ -493,6 +633,74 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-padding" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a90ec2df9600c28a01c56c4784c9207a96d2451833aeceb8cc97e4c9548bb78" +dependencies = [ + "generic-array", +] + +[[package]] +name = "blocking" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c67b173a56acffd6d2326fb7ab938ba0b00a71480e14902b2591c87bc5741e8" +dependencies = [ + "async-channel", + "async-lock", + "async-task", + "atomic-waker", + "fastrand", + "futures-lite", +] + +[[package]] +name = "borsh" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40f9ca3698b2e4cb7c15571db0abc5551dca417a21ae8140460b50309bb2cc62" +dependencies = [ + "borsh-derive", + "hashbrown 0.12.3", +] + +[[package]] +name = "borsh-derive" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "598b3eacc6db9c3ee57b22707ad8f6a8d2f6d442bfe24ffeb8cbb70ca59e6a35" +dependencies = [ + "borsh-derive-internal", + "borsh-schema-derive-internal", + "proc-macro-crate", + "proc-macro2", + "syn", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "186b734fa1c9f6743e90c95d7233c9faab6360d1a96d4ffa19d9cfd1e9350f8a" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99b7ff1008316626f485991b960ade129253d4034014616b94f309a15366cc49" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "brotli" version = "3.3.4" @@ -506,9 +714,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "2.3.2" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ad2d4653bf5ca36ae797b1f4bb4dbddb60ce49ca4aed8a2ce4829f60425b80" +checksum = "4b6561fd3f895a11e8f72af2cb7d22e08366bebc2b6b57f7744c4bda27034744" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -527,9 +735,31 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.11.1" +version = "3.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" + +[[package]] +name = "bytecheck" +version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" +checksum = "13fe11640a23eb24562225322cd3e452b93a3d4091d62fab69c70542fcd17d1f" +dependencies = [ + "bytecheck_derive", + "ptr_meta", + "simdutf8", +] + +[[package]] +name = "bytecheck_derive" +version = "0.6.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31225543cb46f81a7e224762764f4a6a0f097b1db0b175f69e8065efaa42de5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] [[package]] name = "byteorder" @@ -545,18 +775,27 @@ checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" [[package]] name = "bytestring" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b6a75fd3048808ef06af5cd79712be8111960adaf89d90250974b38fc3928a" +checksum = "238e4886760d98c4f899360c834fa93e62cf7f721ac3c2da375cbdf4b8679aae" dependencies = [ "bytes", ] +[[package]] +name = "cbc" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" +dependencies = [ + "cipher", +] + [[package]] name = "cc" -version = "1.0.73" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" dependencies = [ "jobserver", ] @@ -569,33 +808,89 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.22" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfd4d1b31faaa3a89d7934dbded3111da0d2ef28e3ebccdb4f0179f5929d1ef1" +checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" dependencies = [ "iana-time-zone", "js-sys", "num-integer", "num-traits", "serde", - "time 0.1.44", + "time 0.1.45", "wasm-bindgen", "winapi", ] +[[package]] +name = "cipher" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1873270f8f7942c191139cb8a40fd228da6c3fd2fc376d7e92d47aa14aeb59e" +dependencies = [ + "crypto-common", + "inout", +] + [[package]] name = "clap" -version = "2.34.0" +version = "3.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" dependencies = [ - "ansi_term", "atty", "bitflags", + "clap_lex 0.2.4", + "indexmap", "strsim", + "termcolor", "textwrap", - "unicode-width", - "vec_map", +] + +[[package]] +name = "clap" +version = "4.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d7ae14b20b94cb02149ed21a86c423859cbe18dc7ed69845cace50e52b40a5" +dependencies = [ + "bitflags", + "clap_derive", + "clap_lex 0.3.2", + "is-terminal", + "once_cell", + "strsim", + "termcolor", +] + +[[package]] +name = "clap_derive" +version = "4.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44bec8e5c9d09e439c4335b1af0abaab56dcf3b94999a936e1bb47b9134288f0" +dependencies = [ + "heck", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +dependencies = [ + "os_str_bytes", +] + +[[package]] +name = "clap_lex" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "350b9cf31731f9957399229e9b2adc51eeabdfbe9d71d9a0552275fd12710d09" +dependencies = [ + "os_str_bytes", ] [[package]] @@ -630,7 +925,16 @@ dependencies = [ "memchr", "pin-project-lite", "tokio", - "tokio-util 0.7.4", + "tokio-util", +] + +[[package]] +name = "concurrent-queue" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c278839b831783b70278b14df4d45e1beb1aad306c07bb796637de9a0e323e8e" +dependencies = [ + "crossbeam-utils", ] [[package]] @@ -653,12 +957,12 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "cookie" -version = "0.16.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "344adc371239ef32293cb1c4fe519592fcf21206c79c02854320afcdf3ab4917" +checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" dependencies = [ "percent-encoding", - "time 0.3.15", + "time 0.3.20", "version_check", ] @@ -719,9 +1023,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" +checksum = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c" dependencies = [ "cfg-if", "crossbeam-utils", @@ -729,9 +1033,9 @@ dependencies = [ [[package]] name = "crossbeam-queue" -version = "0.3.6" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd42583b04998a5363558e5f9291ee5a5ff6b49944332103f251e7479a82aa7" +checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" dependencies = [ "cfg-if", "crossbeam-utils", @@ -739,9 +1043,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.12" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edbafec5fa1f196ca66527c1b12c2ec4745ca14b50f1ad8f9f6f720b55d11fac" +checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" dependencies = [ "cfg-if", ] @@ -768,9 +1072,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.79" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f83d0ebf42c6eafb8d7c52f7e5f2d3003b89c7aa4fd2b79229209459a849af8" +checksum = "9a140f260e6f3f79013b8bfc65e7ce630c9ab4388c6a89c71e07226f49487b72" dependencies = [ "cc", "cxxbridge-flags", @@ -780,9 +1084,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.79" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07d050484b55975889284352b0ffc2ecbda25c0c55978017c132b29ba0818a86" +checksum = "da6383f459341ea689374bf0a42979739dc421874f112ff26f829b8040b8e613" dependencies = [ "cc", "codespan-reporting", @@ -795,15 +1099,15 @@ dependencies = [ [[package]] name = "cxxbridge-flags" -version = "1.0.79" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d2199b00553eda8012dfec8d3b1c75fce747cf27c169a270b3b99e3448ab78" +checksum = "90201c1a650e95ccff1c8c0bb5a343213bdd317c6e600a93075bca2eff54ec97" [[package]] name = "cxxbridge-macro" -version = "1.0.79" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcb67a6de1f602736dd7eaead0080cf3435df806c61b24b13328db128c58868f" +checksum = "0b75aed41bb2e6367cae39e6326ef817a851db13c13e4f3263714ca3cfb8de56" dependencies = [ "proc-macro2", "quote", @@ -834,11 +1138,20 @@ dependencies = [ "syn", ] +[[package]] +name = "des" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdd80ce8ce993de27e9f063a444a4d53ce8e8db4c1f00cc03af5ad5a9867a1e" +dependencies = [ + "cipher", +] + [[package]] name = "digest" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adfbc57365a37acbd2ebf2b64d7e69bb766e2fea813521ed536f5d0520dcf86c" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ "block-buffer", "crypto-common", @@ -884,33 +1197,57 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] -name = "dtoa" -version = "0.4.8" +name = "dotenvy" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" +checksum = "03d8c417d7a8cb362e0c37e5d815f5eb7c37f79ff93707329d5a194e42e54ca0" +dependencies = [ + "clap 3.2.23", +] [[package]] name = "dyn-clone" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f94fa09c2aeea5b8839e414b7b841bf429fd25b9c522116ac97ee87856d88b2" +checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" [[package]] name = "either" -version = "1.8.0" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +dependencies = [ + "serde", +] + +[[package]] +name = "encoding_rs" +version = "0.8.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "errno" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" +checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" dependencies = [ - "serde", + "errno-dragonfly", + "libc", + "winapi", ] [[package]] -name = "encoding_rs" -version = "0.8.31" +name = "errno-dragonfly" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" dependencies = [ - "cfg-if", + "cc", + "libc", ] [[package]] @@ -919,11 +1256,20 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +[[package]] +name = "executor-trait" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a1052dd43212a7777ec6a69b117da52f5e52f07aec47d00c1a2b33b85d06b08" +dependencies = [ + "async-trait", +] + [[package]] name = "fastrand" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" dependencies = [ "instant", ] @@ -940,9 +1286,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.24" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" +checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" dependencies = [ "crc32fast", "miniz_oxide", @@ -957,7 +1303,7 @@ dependencies = [ "futures-core", "futures-sink", "pin-project", - "spin 0.9.4", + "spin 0.9.5", ] [[package]] @@ -998,9 +1344,9 @@ checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" [[package]] name = "futures" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0" +checksum = "13e2792b0ff0340399d58445b88fd9770e3489eff258a4cbc1523418f12abf84" dependencies = [ "futures-channel", "futures-core", @@ -1013,9 +1359,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5" dependencies = [ "futures-core", "futures-sink", @@ -1023,15 +1369,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" +checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608" [[package]] name = "futures-executor" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" +checksum = "e8de0a35a6ab97ec8869e32a2473f4b1324459e14c29275d14b10cb1fd19b50e" dependencies = [ "futures-core", "futures-task", @@ -1040,9 +1386,9 @@ dependencies = [ [[package]] name = "futures-intrusive" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62007592ac46aa7c2b6416f7deb9a8a8f63a01e0f1d6e1787d5630170db2b63e" +checksum = "a604f7a68fbf8103337523b1fadc8ade7361ee3f112f7c680ad179651616aed5" dependencies = [ "futures-core", "lock_api", @@ -1051,15 +1397,30 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.25" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531" + +[[package]] +name = "futures-lite" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" +checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite", + "waker-fn", +] [[package]] name = "futures-macro" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" +checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70" dependencies = [ "proc-macro2", "quote", @@ -1068,27 +1429,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" +checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364" [[package]] name = "futures-task" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" - -[[package]] -name = "futures-timer" -version = "3.0.2" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366" [[package]] name = "futures-util" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1" dependencies = [ "futures-channel", "futures-core", @@ -1114,9 +1469,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ "cfg-if", "libc", @@ -1125,9 +1480,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.14" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca32592cf21ac7ccab1825cd87f6c9b3d9022c44d086172ed0966bec8af30be" +checksum = "5be7b54589b581f624f566bf5d8eb2bab1db736c51528720b6bd36b96b55924d" dependencies = [ "bytes", "fnv", @@ -1138,7 +1493,7 @@ dependencies = [ "indexmap", "slab", "tokio", - "tokio-util 0.7.4", + "tokio-util", "tracing", ] @@ -1148,7 +1503,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" dependencies = [ - "ahash", + "ahash 0.7.6", ] [[package]] @@ -1157,7 +1512,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash", + "ahash 0.7.6", ] [[package]] @@ -1171,28 +1526,34 @@ dependencies = [ [[package]] name = "heck" -version = "0.3.3" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] -name = "heck" -version = "0.4.0" +name = "hermit-abi" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] [[package]] name = "hermit-abi" -version = "0.1.19" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" dependencies = [ "libc", ] +[[package]] +name = "hermit-abi" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" + [[package]] name = "hex" version = "0.4.3" @@ -1233,13 +1594,13 @@ dependencies = [ [[package]] name = "http" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ "bytes", "fnv", - "itoa 1.0.4", + "itoa", ] [[package]] @@ -1295,9 +1656,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.20" +version = "0.14.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac" +checksum = "5e011372fa0b68db8350aa7a248930ecc7839bf46d8485577d69f117a75f164c" dependencies = [ "bytes", "futures-channel", @@ -1308,7 +1669,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 1.0.4", + "itoa", "pin-project-lite", "socket2", "tokio", @@ -1332,9 +1693,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.51" +version = "0.1.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5a6ef98976b22b3b7f2f3a806f858cb862044cfa66805aa3ad84cb3d3b785ed" +checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1366,14 +1727,24 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.1" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ "autocfg", "hashbrown 0.12.3", ] +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "block-padding", + "generic-array", +] + [[package]] name = "instant" version = "0.1.12" @@ -1383,11 +1754,21 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "io-lifetimes" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfa919a82ea574332e2de6e74b4c36e74d41982b335080fa59d4ef31be20fdf3" +dependencies = [ + "libc", + "windows-sys 0.45.0", +] + [[package]] name = "ipnet" -version = "2.5.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" +checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" [[package]] name = "ipnetwork" @@ -1398,6 +1779,18 @@ dependencies = [ "serde", ] +[[package]] +name = "is-terminal" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b6b32576413a8e69b90e952e4a026476040d81017b80445deda5f2d3921857" +dependencies = [ + "hermit-abi 0.3.1", + "io-lifetimes", + "rustix", + "windows-sys 0.45.0", +] + [[package]] name = "itertools" version = "0.10.5" @@ -1409,30 +1802,24 @@ dependencies = [ [[package]] name = "itoa" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" - -[[package]] -name = "itoa" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "jobserver" -version = "0.1.25" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" +checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.60" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" dependencies = [ "wasm-bindgen", ] @@ -1445,19 +1832,24 @@ checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" [[package]] name = "lapin" -version = "1.10.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c0eacc7b8880c2e73ab70e47c9f099ad81af6debde9353fdb11045c0ce716e" +checksum = "bd03ea5831b44775e296239a64851e2fd14a80a363d202ba147009ffc994ff0f" dependencies = [ "amq-protocol", - "async-task", - "crossbeam-channel", + "async-global-executor-trait", + "async-reactor-trait", + "async-trait", + "executor-trait", + "flume", "futures-core", - "log", - "mio 0.7.14", + "futures-io", "parking_lot 0.12.1", "pinky-swear", + "reactor-trait", "serde", + "tracing", + "waker-fn", ] [[package]] @@ -1471,23 +1863,24 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.135" +version = "0.2.139" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68783febc7782c6c5cb401fbda4de5a9898be1762314da0bb2c10ced61f18b0c" +checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" [[package]] name = "libm" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "292a948cd991e376cf75541fe5b97a1081d713c618b4f1b9500f8844e49eb565" +checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" [[package]] name = "libmimalloc-sys" -version = "0.1.26" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc093ab289b0bfda3aa1bdfab9c9542be29c7ef385cfcbe77f8c9813588eb48" +checksum = "dd8c7cbf8b89019683667e347572e6d55a7df7ea36b0c4ce69961b0cde67b174" dependencies = [ "cc", + "libc", ] [[package]] @@ -1503,13 +1896,19 @@ dependencies = [ [[package]] name = "link-cplusplus" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9272ab7b96c9046fbc5bc56c06c117cb639fe2d509df0c421cad82d2915cf369" +checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" dependencies = [ "cc", ] +[[package]] +name = "linux-raw-sys" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" + [[package]] name = "local-channel" version = "0.1.3" @@ -1549,9 +1948,9 @@ dependencies = [ [[package]] name = "maybe-async" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6007f9dad048e0a224f27ca599d669fca8cfa0dac804725aab542b2eb032bce6" +checksum = "0f1b8c13cb1f814b634a96b2c725449fe7ed464a7b8781de8688be5ffbd3f305" dependencies = [ "proc-macro2", "quote", @@ -1581,9 +1980,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "mimalloc" -version = "0.1.30" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76ce6a4b40d3bff9eb3ce9881ca0737a85072f9f975886082640cd46a75cdb35" +checksum = "9dcb174b18635f7561a0c6c9fc2ce57218ac7523cf72c50af80e2d79ab8f3ba1" dependencies = [ "libmimalloc-sys", ] @@ -1606,9 +2005,9 @@ dependencies = [ [[package]] name = "minidom" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dddfe21863f8d600ed2bd1096cb9b5cd6ff984be6185cf9d563fb4a107bffc5" +checksum = "2e9ce45d459e358790a285e7609ff5ae4cfab88b75f237e8838e62029dda397b" dependencies = [ "rxml", ] @@ -1621,87 +2020,30 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.5.4" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.7.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" -dependencies = [ - "libc", - "log", - "miow", - "ntapi", - "winapi", -] - -[[package]] -name = "mio" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" +checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" dependencies = [ "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.36.1", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi", -] - -[[package]] -name = "mobc" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f76d2f2e2dcbb00a8d3b2b09f026a74a82693ea52cd071647aa6cfa7f1ff37e" -dependencies = [ - "async-trait", - "futures-channel", - "futures-core", - "futures-timer", - "futures-util", - "log", - "tokio", -] - -[[package]] -name = "mobc-lapin" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c0820bedacbc30154f91261b87d6f92ee40e74592df4e5e815f9b817f290127" -dependencies = [ - "lapin", - "mobc", -] - -[[package]] -name = "mobc-redis" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7b5db77b37c9224d5b9949b214041ea3e1c15b6b1e5dd24a5acb8e73975d6d6" -dependencies = [ - "mobc", - "redis", + "windows-sys 0.45.0", ] [[package]] name = "native-tls" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ "lazy_static", "libc", @@ -1717,23 +2059,14 @@ dependencies = [ [[package]] name = "nom" -version = "7.1.1" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ "memchr", "minimal-lexical", ] -[[package]] -name = "ntapi" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" -dependencies = [ - "winapi", -] - [[package]] name = "num-bigint" version = "0.3.3" @@ -1747,9 +2080,9 @@ dependencies = [ [[package]] name = "num-bigint-dig" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "566d173b2f9406afbc5510a90925d5a2cd80cae4605631f1212303df265de011" +checksum = "2399c9463abc5f909349d8aa9ba080e0b88b3ce2885389b60b993f39b1a56905" dependencies = [ "byteorder", "lazy_static", @@ -1795,34 +2128,25 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "num_threads" -version = "0.1.6" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" dependencies = [ + "hermit-abi 0.2.6", "libc", ] [[package]] name = "once_cell" -version = "1.15.0" +version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" +checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" [[package]] name = "openssl" -version = "0.10.42" +version = "0.10.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12fc0523e3bd51a692c8850d075d74dc062ccf251c0110668cbd921917118a13" +checksum = "b102428fd03bc5edf97f62620f7298614c45cedf287c271e7ed450bbaf83f2e1" dependencies = [ "bitflags", "cfg-if", @@ -1852,18 +2176,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "111.22.0+1.1.1q" +version = "111.25.1+1.1.1t" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f31f0d509d1c1ae9cada2f9539ff8f37933831fd5098879e482aa687d659853" +checksum = "1ef9a9cc6ea7d9d5e7c4a913dc4b48d0e359eddf01af1dfec96ba7064b4aba10" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.76" +version = "0.9.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5230151e44c0f05157effb743e8d517472843121cf9243e8b81393edb5acd9ce" +checksum = "23bbbf7854cd45b83958ebe919f0e8e516793727652e27fda10a8384cfc790b7" dependencies = [ "autocfg", "cc", @@ -1883,6 +2207,35 @@ dependencies = [ "hashbrown 0.12.3", ] +[[package]] +name = "os_str_bytes" +version = "6.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" + +[[package]] +name = "p12" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4873306de53fe82e7e484df31e1e947d61514b6ea2ed6cd7b45d63006fd9224" +dependencies = [ + "cbc", + "cipher", + "des", + "getrandom", + "hmac", + "lazy_static", + "rc2", + "sha1 0.10.5", + "yasna", +] + +[[package]] +name = "parking" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" + [[package]] name = "parking_lot" version = "0.11.2" @@ -1891,7 +2244,7 @@ checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", "lock_api", - "parking_lot_core 0.8.5", + "parking_lot_core 0.8.6", ] [[package]] @@ -1901,14 +2254,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.4", + "parking_lot_core 0.9.7", ] [[package]] name = "parking_lot_core" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" dependencies = [ "cfg-if", "instant", @@ -1920,33 +2273,22 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.4" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dc9e0dc2adc1c69d09143aff38d3d30c5c3f0df0dad82e6d25547af174ebec0" +checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "paste" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1" - -[[package]] -name = "pem" -version = "0.8.3" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd56cbd21fea48d0c440b41cd69c589faacade08c992d9a54e471b79d0fd13eb" -dependencies = [ - "base64 0.13.0", - "once_cell", - "regex", -] +checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" [[package]] name = "pem-rfc7468" @@ -1965,9 +2307,9 @@ checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "pest" -version = "2.4.0" +version = "2.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbc7bc69c062e492337d74d59b120c274fd3d261b6bf6d3207d499b4b379c41a" +checksum = "8cbd939b234e95d72bc393d51788aec68aeeb5d51e748ca08ff3aad58cb722f7" dependencies = [ "thiserror", "ucd-trie", @@ -1975,9 +2317,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.4.0" +version = "2.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b75706b9642ebcb34dab3bc7750f811609a0eb1dd8b88c2d15bf628c1c65b2" +checksum = "a81186863f3d0a27340815be8f2078dd8050b14cd71913db9fbda795e5f707d7" dependencies = [ "pest", "pest_generator", @@ -1985,9 +2327,9 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.4.0" +version = "2.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f9272122f5979a6511a749af9db9bfc810393f63119970d7085fed1c4ea0db" +checksum = "75a1ef20bf3193c15ac345acb32e26b3dc3223aff4d77ae4fc5359567683796b" dependencies = [ "pest", "pest_meta", @@ -1998,13 +2340,13 @@ dependencies = [ [[package]] name = "pest_meta" -version = "2.4.0" +version = "2.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8717927f9b79515e565a64fe46c38b8cd0427e64c40680b14a7365ab09ac8d" +checksum = "5e3b284b1f13a20dc5ebc90aff59a51b8d7137c221131b52a7260c08cbc1cc80" dependencies = [ "once_cell", "pest", - "sha1 0.10.5", + "sha2", ] [[package]] @@ -2041,11 +2383,12 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pinky-swear" -version = "4.5.0" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5ade3d5e4fa85586b4795e097180fd48447d39fb56e351bd889f1c9664291a8" +checksum = "d894b67aa7a4bf295db5e85349078c604edaa6fa5c8721e8eca3c7729a27f2ac" dependencies = [ "doc-comment", + "flume", "parking_lot 0.12.1", "tracing", ] @@ -2074,15 +2417,38 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.25" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" + +[[package]] +name = "polling" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" +checksum = "22122d5ec4f9fe1b3916419b76be1e80bcb93f618d071d2edf841b137b2a2bd6" +dependencies = [ + "autocfg", + "cfg-if", + "libc", + "log", + "wepoll-ffi", + "windows-sys 0.42.0", +] [[package]] name = "ppv-lite86" -version = "0.2.16" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml", +] [[package]] name = "proc-macro-error" @@ -2110,24 +2476,24 @@ dependencies = [ [[package]] name = "proc-macro-hack" -version = "0.5.19" +version = "0.5.20+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" +checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.47" +version = "1.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" +checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" dependencies = [ "unicode-ident", ] [[package]] name = "prometheus" -version = "0.13.2" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45c8babc29389186697fe5a2a4859d697825496b83db5d0b65271cdc0488e88c" +checksum = "449811d15fbdf5ceb5c1144416066429cf82316e2ec8ce0c1f6f8a02e7bbcf8c" dependencies = [ "cfg-if", "fnv", @@ -2144,11 +2510,31 @@ version = "2.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" +[[package]] +name = "ptr_meta" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" +dependencies = [ + "ptr_meta_derive", +] + +[[package]] +name = "ptr_meta_derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "quote" -version = "1.0.21" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" dependencies = [ "proc-macro2", ] @@ -2239,7 +2625,7 @@ version = "3.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6324adca27a8b4f1fb5e98b8cfd08d91cf3c5007d1c1c24651234004e585123" dependencies = [ - "base64 0.13.0", + "base64 0.13.1", "bigdecimal", "bit-vec", "chrono", @@ -2285,7 +2671,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "187141a7d66aea864ac042af881cd0618e4ae11fe86232600c0b172e35741b59" dependencies = [ "async-trait", - "base64 0.13.0", + "base64 0.13.1", "html_parser", "proc-macro2", "quote", @@ -2299,8 +2685,8 @@ version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65bf0ecc799682a85ab76226c1b63fd2ef9dd0a0f5cd21d877b0af44dc8cc2bf" dependencies = [ - "ahash", - "base64 0.13.0", + "ahash 0.7.6", + "base64 0.13.1", "chrono", "hex", "indexmap", @@ -2313,31 +2699,51 @@ dependencies = [ ] [[package]] -name = "rdrand" -version = "0.4.0" +name = "rc2" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62c64daa8e9438b84aaae55010a93f396f8e60e3911590fcba770d04643fc1dd" +dependencies = [ + "cipher", +] + +[[package]] +name = "rdrand" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "reactor-trait" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" +checksum = "438a4293e4d097556730f4711998189416232f009c137389e0f961d2bc0ddc58" dependencies = [ - "rand_core 0.3.1", + "async-trait", + "futures-core", + "futures-io", ] [[package]] name = "redis" -version = "0.19.0" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a6ddfecac9391fed21cce10e83c65fa4abafd77df05c98b1c647c65374ce9b3" +checksum = "aa8455fa3621f6b41c514946de66ea0531f57ca017b2e6c7cc368035ea5b46df" dependencies = [ "async-trait", "bytes", "combine", - "dtoa", "futures-util", - "itoa 0.4.8", + "itoa", "percent-encoding", "pin-project-lite", - "sha1 0.6.1", + "ryu", + "sha1_smol", "tokio", - "tokio-util 0.6.10", + "tokio-util", "url", ] @@ -2363,9 +2769,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" +checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" dependencies = [ "aho-corasick", "memchr", @@ -2380,9 +2786,9 @@ checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" [[package]] name = "regex-syntax" -version = "0.6.27" +version = "0.6.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" +checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" [[package]] name = "remove_dir_all" @@ -2393,13 +2799,22 @@ dependencies = [ "winapi", ] +[[package]] +name = "rend" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581008d2099240d37fb08d77ad713bcaec2c4d89d50b5b21a8bb1996bbab68ab" +dependencies = [ + "bytecheck", +] + [[package]] name = "reqwest" -version = "0.11.12" +version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "431949c384f4e2ae07605ccaa56d1d9d2ecdb5cadd4f9577ccfab29f2e5149fc" +checksum = "21eed90ec8570952d53b772ecf8f206aa1ec9a3d76b2521c56c42973f2d91ee9" dependencies = [ - "base64 0.13.0", + "base64 0.21.0", "bytes", "encoding_rs", "futures-core", @@ -2422,11 +2837,12 @@ dependencies = [ "serde_urlencoded", "tokio", "tokio-native-tls", - "tokio-util 0.7.4", + "tokio-util", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", + "wasm-streams", "web-sys", "winreg", ] @@ -2446,6 +2862,31 @@ dependencies = [ "winapi", ] +[[package]] +name = "rkyv" +version = "0.7.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c30f1d45d9aa61cbc8cd1eb87705470892289bb2d01943e7803b873a57404dc3" +dependencies = [ + "bytecheck", + "hashbrown 0.12.3", + "ptr_meta", + "rend", + "rkyv_derive", + "seahash", +] + +[[package]] +name = "rkyv_derive" +version = "0.7.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff26ed6c7c4dfc2aa9480b86a60e3c7233543a270a680e10758a507c5a4ce476" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "rsa" version = "0.6.1" @@ -2485,7 +2926,7 @@ dependencies = [ "async-trait", "aws-creds", "aws-region", - "base64 0.13.0", + "base64 0.13.1", "cfg-if", "hex", "hmac", @@ -2501,7 +2942,7 @@ dependencies = [ "serde_derive", "sha2", "thiserror", - "time 0.3.15", + "time 0.3.20", "tokio", "tokio-stream", "url", @@ -2509,13 +2950,20 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.26.1" +version = "1.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee9164faf726e4f3ece4978b25ca877ddc6802fa77f38cdccb32c7f805ecd70c" +checksum = "e13cf35f7140155d02ba4ec3294373d513a3c7baa8364c162b030e33c61520a8" dependencies = [ "arrayvec", + "borsh", + "bytecheck", + "byteorder", + "bytes", "num-traits", + "rand 0.8.5", + "rkyv", "serde", + "serde_json", ] [[package]] @@ -2533,7 +2981,21 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.14", + "semver 1.0.16", +] + +[[package]] +name = "rustix" +version = "0.36.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd5c6ff11fecd55b40746d1995a02f2eb375bf8c00d192d521ee09f42bef37bc" +dependencies = [ + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys", + "windows-sys 0.45.0", ] [[package]] @@ -2542,11 +3004,56 @@ version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" dependencies = [ - "base64 0.13.0", + "base64 0.13.1", + "log", + "ring", + "sct 0.6.1", + "webpki 0.21.4", +] + +[[package]] +name = "rustls" +version = "0.20.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +dependencies = [ "log", "ring", - "sct", - "webpki", + "sct 0.7.0", + "webpki 0.22.0", +] + +[[package]] +name = "rustls-connector" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c6a18f8d10f71bce9bca6eaeb80429460e652f3bcf0381f0c5f8954abf7b3b8" +dependencies = [ + "log", + "rustls 0.20.8", + "rustls-native-certs", + "webpki 0.22.0", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" +dependencies = [ + "base64 0.21.0", ] [[package]] @@ -2560,11 +3067,16 @@ dependencies = [ "actix-web", "actix-web-prom", "async-trait", - "base64 0.20.0", + "base64 0.21.0", + "bb8", + "bb8-lapin", + "bb8-redis", "bytes", "chrono", + "clap 4.1.8", "derive_more", "digest", + "dotenvy", "dyn-clone", "fern", "futures", @@ -2573,34 +3085,31 @@ dependencies = [ "log", "md-5", "mimalloc", - "mobc-lapin", - "mobc-redis", "openssl", "prometheus", "rbatis", "rbson", + "redis", "reqwest", "rust-s3", "serde", "serde_json", "sha1 0.10.5", "sha2", - "structopt", "strum", "tempdir", "thiserror", "tokio", - "tokio-amqp", "url", - "uuid 1.2.1", + "uuid 1.3.0", "wildmatch", ] [[package]] name = "rustversion" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" +checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" [[package]] name = "rxml" @@ -2623,18 +3132,17 @@ checksum = "53bc79743f9a66c2fb1f951cd83735f275d46bfe466259fbc5897bb60a0d00ee" [[package]] name = "ryu" -version = "1.0.11" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" [[package]] name = "schannel" -version = "0.1.20" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" +checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" dependencies = [ - "lazy_static", - "windows-sys 0.36.1", + "windows-sys 0.42.0", ] [[package]] @@ -2645,9 +3153,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "scratch" -version = "1.0.2" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" +checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" [[package]] name = "sct" @@ -2659,11 +3167,27 @@ dependencies = [ "untrusted", ] +[[package]] +name = "sct" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "seahash" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" + [[package]] name = "security-framework" -version = "2.7.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" +checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" dependencies = [ "bitflags", "core-foundation", @@ -2674,9 +3198,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.6.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" +checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" dependencies = [ "core-foundation-sys", "libc", @@ -2693,9 +3217,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.14" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4" +checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" [[package]] name = "semver-parser" @@ -2705,9 +3229,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.145" +version = "1.0.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b" +checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" dependencies = [ "serde_derive", ] @@ -2726,18 +3250,18 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.7" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b" +checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.145" +version = "1.0.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c" +checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" dependencies = [ "proc-macro2", "quote", @@ -2746,12 +3270,12 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.87" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45" +checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea" dependencies = [ "indexmap", - "itoa 1.0.4", + "itoa", "ryu", "serde", ] @@ -2763,16 +3287,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.4", + "itoa", "ryu", "serde", ] [[package]] name = "sha-1" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" +checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" dependencies = [ "cfg-if", "cpufeatures", @@ -2818,18 +3342,24 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" dependencies = [ "libc", ] +[[package]] +name = "simdutf8" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" + [[package]] name = "slab" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" dependencies = [ "autocfg", ] @@ -2851,9 +3381,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", "winapi", @@ -2867,9 +3397,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spin" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6002a767bff9e83f8eeecf883ecb8011875a21ae8da43bffb817a57e78cc09" +checksum = "7dccf47db1b41fa1573ed27ccf5e08e3ca771cb994f776668c5ebda893b248fc" dependencies = [ "lock_api", ] @@ -2901,9 +3431,9 @@ version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48c61941ccf5ddcada342cd59e3e5173b007c509e1e8e990dafc830294d9dc5" dependencies = [ - "ahash", + "ahash 0.7.6", "atoi", - "base64 0.13.0", + "base64 0.13.1", "bigdecimal", "bit-vec", "bitflags", @@ -2929,7 +3459,7 @@ dependencies = [ "hkdf", "hmac", "indexmap", - "itoa 1.0.4", + "itoa", "libc", "libsqlite3-sys", "log", @@ -2943,7 +3473,7 @@ dependencies = [ "regex", "rsa", "rust_decimal", - "rustls", + "rustls 0.19.1", "serde", "serde_json", "sha-1", @@ -2956,7 +3486,7 @@ dependencies = [ "tokio-stream", "url", "uuid 0.8.2", - "webpki", + "webpki 0.21.4", "webpki-roots", "whoami", ] @@ -3048,33 +3578,9 @@ dependencies = [ [[package]] name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" - -[[package]] -name = "structopt" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" -dependencies = [ - "clap", - "lazy_static", - "structopt-derive", -] - -[[package]] -name = "structopt-derive" -version = "0.4.18" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" -dependencies = [ - "heck 0.3.3", - "proc-macro-error", - "proc-macro2", - "quote", - "syn", -] +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "strum" @@ -3091,7 +3597,7 @@ version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ - "heck 0.4.0", + "heck", "proc-macro2", "quote", "rustversion", @@ -3106,9 +3612,9 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.102" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fcd952facd492f9be3ef0d0b7032a6e442ee9b361d4acc2b1d0c4aaa5f613a1" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", "quote", @@ -3117,14 +3623,14 @@ dependencies = [ [[package]] name = "tcp-stream" -version = "0.20.10" +version = "0.24.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c839b9cf24db4225fa445589e014e6ecc4c42ba6ecf5db3e9fe38fbe8ea2377a" +checksum = "09a4b0a70bac0a58ca6a7659d1328e34ee462339c70b0fa49f72bad1f278910a" dependencies = [ "cfg-if", - "mio 0.7.14", - "native-tls", - "pem", + "p12", + "rustls-connector", + "rustls-pemfile", ] [[package]] @@ -3139,50 +3645,46 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95" dependencies = [ "cfg-if", "fastrand", - "libc", "redox_syscall", - "remove_dir_all", - "winapi", + "rustix", + "windows-sys 0.42.0", ] [[package]] name = "termcolor" -version = "1.1.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" dependencies = [ "winapi-util", ] [[package]] name = "textwrap" -version = "0.11.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] +checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.37" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" +checksum = "a5ab016db510546d856297882807df8da66a16fb8c4101cb8b30054b0d5b2d9c" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.37" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" +checksum = "5420d42e90af0c38c3290abcca25b9b3bdf379fc9f55c528f53a269d9c9a267e" dependencies = [ "proc-macro2", "quote", @@ -3191,9 +3693,9 @@ dependencies = [ [[package]] name = "time" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" +checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" dependencies = [ "libc", "wasi 0.10.0+wasi-snapshot-preview1", @@ -3218,17 +3720,22 @@ dependencies = [ [[package]] name = "time" -version = "0.3.15" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d634a985c4d4238ec39cacaed2e7ae552fbd3c476b552c1deac3021b7d7eaf0c" +checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" dependencies = [ - "itoa 1.0.4", - "libc", - "num_threads", + "itoa", "serde", - "time-macros 0.2.4", + "time-core", + "time-macros 0.2.8", ] +[[package]] +name = "time-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" + [[package]] name = "time-macros" version = "0.1.1" @@ -3241,9 +3748,12 @@ dependencies = [ [[package]] name = "time-macros" -version = "0.2.4" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42657b1a6f4d817cda8e7a0ace261fe0cc946cf3a80314390b22cc61ae080792" +checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36" +dependencies = [ + "time-core", +] [[package]] name = "time-macros-impl" @@ -3269,46 +3779,35 @@ dependencies = [ [[package]] name = "tinyvec_macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.21.2" +version = "1.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e03c497dc955702ba729190dc4aac6f2a0ce97f913e5b1b5912fc5039d9099" +checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" dependencies = [ "autocfg", "bytes", "libc", "memchr", - "mio 0.8.4", + "mio", "num_cpus", "parking_lot 0.12.1", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "winapi", -] - -[[package]] -name = "tokio-amqp" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85ac53b83d524e047f3d20ce43dc5851d932dcb187578a5b37f754ca61b909d1" -dependencies = [ - "lapin", - "parking_lot 0.12.1", - "tokio", + "windows-sys 0.45.0", ] [[package]] name = "tokio-macros" -version = "1.8.0" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" +checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" dependencies = [ "proc-macro2", "quote", @@ -3317,9 +3816,9 @@ dependencies = [ [[package]] name = "tokio-native-tls" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" dependencies = [ "native-tls", "tokio", @@ -3331,16 +3830,16 @@ version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" dependencies = [ - "rustls", + "rustls 0.19.1", "tokio", - "webpki", + "webpki 0.21.4", ] [[package]] name = "tokio-stream" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce" +checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313" dependencies = [ "futures-core", "pin-project-lite", @@ -3349,30 +3848,25 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.6.10" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" +checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" dependencies = [ "bytes", "futures-core", "futures-sink", - "log", "pin-project-lite", "tokio", + "tracing", ] [[package]] -name = "tokio-util" -version = "0.7.4" +name = "toml" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", - "tracing", + "serde", ] [[package]] @@ -3404,15 +3898,15 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "typenum" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "ucd-trie" @@ -3431,15 +3925,15 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.8" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" [[package]] name = "unicode-ident" -version = "1.0.5" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" +checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" [[package]] name = "unicode-normalization" @@ -3450,12 +3944,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-segmentation" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" - [[package]] name = "unicode-width" version = "0.1.10" @@ -3497,9 +3985,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "feb41e78f93363bb2df8b0e86a2ca30eed7806ea16ea0c790d757cf93f79be83" +checksum = "1674845326ee10d37ca60470760d4288a6f80f304007d92e5c53bab78c9cfd79" dependencies = [ "getrandom", ] @@ -3510,18 +3998,18 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - [[package]] name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "waker-fn" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" + [[package]] name = "want" version = "0.3.0" @@ -3546,9 +4034,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3556,9 +4044,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" dependencies = [ "bumpalo", "log", @@ -3571,9 +4059,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.33" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" +checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" dependencies = [ "cfg-if", "js-sys", @@ -3583,9 +4071,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3593,9 +4081,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ "proc-macro2", "quote", @@ -3606,15 +4094,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" +checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" + +[[package]] +name = "wasm-streams" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bbae3363c08332cadccd13b67db371814cd214c2524020932f0804b8cf7c078" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] [[package]] name = "web-sys" -version = "0.3.60" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" +checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" dependencies = [ "js-sys", "wasm-bindgen", @@ -3630,22 +4131,40 @@ dependencies = [ "untrusted", ] +[[package]] +name = "webpki" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "webpki-roots" version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" dependencies = [ - "webpki", + "webpki 0.21.4", +] + +[[package]] +name = "wepoll-ffi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" +dependencies = [ + "cc", ] [[package]] name = "whoami" -version = "1.2.3" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6631b6a2fd59b1841b622e8f1a7ad241ef0a46f2d580464ce8140ac94cbd571" +checksum = "45dbc71f0cdca27dc261a9bd37ddec174e4a0af2b900b890f378460f745426e3" dependencies = [ - "bumpalo", "wasm-bindgen", "web-sys", ] @@ -3687,19 +4206,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows-sys" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" -dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", -] - [[package]] name = "windows-sys" version = "0.42.0" @@ -3707,85 +4213,79 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.0", - "windows_i686_gnu 0.42.0", - "windows_i686_msvc 0.42.0", - "windows_x86_64_gnu 0.42.0", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.0", + "windows_x86_64_msvc", ] [[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.0" +name = "windows-sys" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets", +] [[package]] -name = "windows_aarch64_msvc" -version = "0.36.1" +name = "windows-targets" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] [[package]] -name = "windows_aarch64_msvc" -version = "0.42.0" +name = "windows_aarch64_gnullvm" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" +checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" [[package]] -name = "windows_i686_gnu" -version = "0.36.1" +name = "windows_aarch64_msvc" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" [[package]] name = "windows_i686_gnu" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" - -[[package]] -name = "windows_i686_msvc" -version = "0.36.1" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" [[package]] name = "windows_i686_msvc" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" +checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" [[package]] name = "windows_x86_64_gnu" -version = "0.36.1" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" +checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.36.1" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" [[package]] name = "windows_x86_64_msvc" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" +checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" [[package]] name = "winreg" @@ -3802,6 +4302,12 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" +[[package]] +name = "yasna" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aed2e7a52e3744ab4d0c05c20aa065258e84c49fd4226f5191b2ed29712710b4" + [[package]] name = "zeroize" version = "1.5.7" @@ -3810,18 +4316,18 @@ checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" [[package]] name = "zstd" -version = "0.11.2+zstd.1.5.2" +version = "0.12.3+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +checksum = "76eea132fb024e0e13fd9c2f5d5d595d8a967aa72382ac2f9d39fcc95afd0806" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "5.0.2+zstd.1.5.2" +version = "6.0.4+zstd.1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +checksum = "7afb4b54b8910cf5447638cb54bf4e8a65cbedd783af98b98c62ffe91f185543" dependencies = [ "libc", "zstd-sys", @@ -3829,10 +4335,11 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.1+zstd.1.5.2" +version = "2.0.7+zstd.1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fd07cbbc53846d9145dbffdf6dd09a7a0aa52be46741825f5c97bdd4f73f12b" +checksum = "94509c3ba2fe55294d752b79842c530ccfab760192521df74a081a78d2b3c7f5" dependencies = [ "cc", "libc", + "pkg-config", ] diff --git a/Cargo.toml b/Cargo.toml index a679d50..99f2cb8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,9 +17,10 @@ readme = "README.md" name = "rustus" [dependencies] -bytes = "~1.3.0" +bytes = "^1.3.0" +bb8 = "^0.8.0" async-trait = "^0.1.52" -base64 = "0.20.0" +base64 = "^0.21.0" log = "^0.4.14" serde_json = "^1" thiserror = "^1.0" @@ -32,7 +33,8 @@ wildmatch = "2.1.0" md-5 = "^0.10.1" digest = "0.10.3" mimalloc = { version = "~0.1.30", default-features = false } - +clap = { version = "4.1.8", features = ["derive", "env"] } +dotenvy = { version = "0.15.6", features = ["clap"] } [dependencies.sha1] version = "^0.10.1" @@ -74,15 +76,19 @@ version = "^0.6.0" [dependencies.lapin] optional = true -version = "^1.0.0" +version = "^2.0.0" + +[dependencies.bb8-lapin] +version = "^0.4.0" +optional = true -[dependencies.mobc-lapin] +[dependencies.bb8-redis] optional = true -version = "^0.7.0" +version = "^0.12.0" -[dependencies.mobc-redis] +[dependencies.redis] optional = true -version = "^0.7.0" +version = "^0.22.3" [dependencies.rbatis] default-features = false @@ -98,9 +104,6 @@ version = "^2.0" features = ["json"] version = "^0.11.8" -[dependencies.structopt] -version = "^0.3" - [dependencies.strum] features = ["derive"] version = "0.24.0" @@ -119,10 +122,6 @@ features = [ ] version = "^1.4.0" -[dependencies.tokio-amqp] -optional = true -version = "^1.0.0" - [dependencies.uuid] features = ["v4"] version = "^1.0.0-alpha.1" @@ -131,15 +130,11 @@ version = "^1.0.0-alpha.1" version = "~0.32.3" [features] -all = [ - "redis_info_storage", - "db_info_storage", - "amqp_notifier", -] -amqp_notifier = ["lapin", "tokio-amqp", "mobc-lapin"] +all = ["redis_info_storage", "db_info_storage", "amqp_notifier"] +amqp_notifier = ["lapin", "bb8-lapin"] db_info_storage = ["rbatis", "rbson"] default = [] -redis_info_storage = ["mobc-redis"] +redis_info_storage = ["bb8-redis", "redis"] ### For testing test_redis = [] diff --git a/docs/configuration.md b/docs/configuration.md index 6bc769c..671685b 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -39,7 +39,7 @@ Also you can disable access log for `/health` endpoint, by using `--disable-heal --url "/files" \ --log-level "INFO" \ --cors "my.*.domain.com,your.*.domain.com" \ - --disable-health-access-log "yes" + --disable-health-access-log ``` === "ENV" @@ -52,7 +52,7 @@ Also you can disable access log for `/health` endpoint, by using `--disable-heal export RUSTUS_URL="/files" export RUSTUS_LOG_LEVEL="INFO" export RUSTUS_CORS="my.*.domain.com,your.*.domain.com" - export RUSTUS_DISABLE_HEALTH_ACCESS_LOG="yes" + export RUSTUS_DISABLE_HEALTH_ACCESS_LOG="true" rustus ``` @@ -105,7 +105,7 @@ data === "CLI" ``` bash - rustus --force-fsync "yes" \ + rustus --force-fsync \ --storage "file-storage" \ --data-dir "./data/" \ --dir-structure "{year}/{month}/{day}" @@ -117,7 +117,7 @@ data export RUSTUS_STORAGE="file-storage" export RUSTUS_DATA_DIR="./data/" export RUSTUS_DIR_STRUCTURE="{year}/{month}/{day}" - export RUSTUS_FORCE_FSYNC="yes" + export RUSTUS_FORCE_FSYNC="true" rustus ``` @@ -167,9 +167,9 @@ Required parameter are only `--s3-url` and `--s3-bucket`. --s3-profile "my_profile" \ --s3-security-token "token" \ --s3-session-token "token" \ - --s3-force-path-style "yes" \ + --s3-force-path-style \ --s3-headers '{"x-amz-acl": "public-read"}' \ - --force-fsync "yes" \ + --force-fsync \ --data-dir "./data/" \ --dir-structure "{year}/{month}/{day}" ``` @@ -189,7 +189,7 @@ Required parameter are only `--s3-url` and `--s3-bucket`. export RUSTUS_S3_HEADERS='{"x-amz-acl": "public-read"}' export RUSTUS_DATA_DIR="./data/" export RUSTUS_DIR_STRUCTURE="{year}/{month}/{day}" - export RUSTUS_FORCE_FSYNC="yes" + export RUSTUS_FORCE_FSYNC="true" rustus ``` @@ -317,7 +317,7 @@ By default all extensions are enabled. === "CLI" ``` bash - rustus --remove-parts "yes" \ + rustus --remove-parts \ --tus-extensions "getting,creation,termination,creation-with-upload,creation-defer-length,concatenation,checksum" ``` @@ -325,7 +325,7 @@ By default all extensions are enabled. ``` bash export RUSTUS_TUS_EXTENSIONS="getting,creation,termination,creation-with-upload,creation-defer-length,concatenation,checksum" - export RUSTUS_REMOVE_PARTS="yes" + export RUSTUS_REMOVE_PARTS="true" rustus ``` diff --git a/docs/hooks.md b/docs/hooks.md index a17ee74..d89ad3d 100644 --- a/docs/hooks.md +++ b/docs/hooks.md @@ -59,13 +59,13 @@ This option disabled by default for security purposes unless you can be sure tha === "CLI" ``` bash - rustus --behind-proxy "yes" + rustus --behind-proxy ``` === "ENV" ``` bash - export RUSTUS_BEHIND_PROXY="yes" + export RUSTUS_BEHIND_PROXY="true" rustus ``` @@ -913,11 +913,11 @@ Otherwise, it will use only one routing key and only one queue! --hooks-amqp-exchange "rustus" \ --hooks-amqp-exchange-kind "topic" \ --hooks-amqp-routing-key "route66" \ - --hooks-amqp-declare-exchange "yes" \ - --hooks-amqp-declare-queues "yes" \ - --hooks-amqp-durable-exchange "yes" \ - --hooks-amqp-durable-queues "yes" \ - --hooks-amqp-celery "yes" + --hooks-amqp-declare-exchange \ + --hooks-amqp-declare-queues \ + --hooks-amqp-durable-exchange \ + --hooks-amqp-durable-queues \ + --hooks-amqp-celery ``` === "ENV" @@ -928,11 +928,11 @@ Otherwise, it will use only one routing key and only one queue! export RUSTUS_HOOKS_AMQP_EXCHANGE="rustus" export RUSTUS_HOOKS_AMQP_EXCHANGE_KIND="topic" export RUSTUS_HOOKS_AMQP_ROUTING_KEY="route66" - export RUSTUS_HOOKS_AMQP_DECLARE_EXCHANGE="yes" - export RUSTUS_HOOKS_AMQP_DECLARE_QUEUES="yes" - export RUSTUS_HOOKS_AMQP_DURABLE_EXCHANGE="yes" - export RUSTUS_HOOKS_AMQP_DURABLE_QUEUES="yes" - export RUSTUS_HOOKS_AMQP_CELERY="yes" + export RUSTUS_HOOKS_AMQP_DECLARE_EXCHANGE="true" + export RUSTUS_HOOKS_AMQP_DECLARE_QUEUES="true" + export RUSTUS_HOOKS_AMQP_DURABLE_EXCHANGE="true" + export RUSTUS_HOOKS_AMQP_DURABLE_QUEUES="true" + export RUSTUS_HOOKS_AMQP_CELERY="true" rustus ``` @@ -1007,7 +1007,7 @@ adds required by Celery headers to every message. --hooks-amqp-exchange "celery" \ --hooks-amqp-exchange-kind "direct" \ --hooks-amqp-routing-key "celery" \ - --hooks-amqp-celery "yes" + --hooks-amqp-celery ``` === "ENV" @@ -1017,7 +1017,7 @@ adds required by Celery headers to every message. export RUSTUS_HOOKS_AMQP_EXCHANGE="celery" export RUSTUS_HOOKS_AMQP_EXCHANGE_KIND="direct" export RUSTUS_HOOKS_AMQP_ROUTING_KEY="celery" - export RUSTUS_HOOKS_AMQP_CELERY="yes" + export RUSTUS_HOOKS_AMQP_CELERY="true" rustus ``` diff --git a/src/config.rs b/src/config.rs index c2a9228..4aabffe 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,6 +1,6 @@ use std::{ffi::OsString, path::PathBuf}; -use structopt::StructOpt; +use clap::Parser; use crate::{ info_storages::AvailableInfoStores, @@ -10,20 +10,20 @@ use crate::{ use crate::storages::AvailableStores; -#[derive(StructOpt, Debug, Clone)] +#[derive(Parser, Debug, Clone)] pub struct StorageOptions { /// Rustus storage type. /// /// Storages are used to store /// uploads. - #[structopt(long, short, default_value = "file-storage", env = "RUSTUS_STORAGE")] + #[arg(long, short, default_value = "file-storage", env = "RUSTUS_STORAGE")] pub storage: AvailableStores, /// Rustus data directory /// /// This directory is used to store files /// for all *file_storage storages. - #[structopt(long, env = "RUSTUS_DATA_DIR", default_value = "./data")] + #[arg(long, env = "RUSTUS_DATA_DIR", default_value = "./data")] pub data_dir: PathBuf, /// Storage directory structure. @@ -32,7 +32,7 @@ pub struct StorageOptions { /// day, month, year or even environment variables. /// Example: "/year/month/day/env[HOSTNAME]/". /// - #[structopt(long, env = "RUSTUS_DIR_STRUCTURE", default_value = "")] + #[arg(long, env = "RUSTUS_DIR_STRUCTURE", default_value = "")] pub dir_structure: String, /// Forces fsync call after writing chunk to filesystem. @@ -41,61 +41,61 @@ pub struct StorageOptions { /// everything is written on disk correctly. /// /// In most cases this parameter is redundant. - #[structopt(long, env = "RUSTUS_FORCE_FSYNC")] + #[arg(long, env = "RUSTUS_FORCE_FSYNC")] pub force_fsync: bool, /// S3 bucket to upload files to. /// /// This parameter is required fo s3-based storages. - #[structopt(long, required_if("storage", "hybrid-s3"), env = "RUSTUS_S3_BUCKET")] + #[arg(long, required_if_eq("storage", "hybrid-s3"), env = "RUSTUS_S3_BUCKET")] pub s3_bucket: Option, /// S3 region. /// /// This parameter is required fo s3-based storages. - #[structopt(long, required_if("storage", "hybrid-s3"), env = "RUSTUS_S3_REGION")] + #[arg(long, required_if_eq("storage", "hybrid-s3"), env = "RUSTUS_S3_REGION")] pub s3_region: Option, /// S3 access key. /// /// This parameter is required fo s3-based storages. - #[structopt(long, env = "RUSTUS_S3_ACCESS_KEY")] + #[arg(long, env = "RUSTUS_S3_ACCESS_KEY")] pub s3_access_key: Option, /// S3 secret key. /// /// This parameter is required fo s3-based storages. - #[structopt(long, env = "RUSTUS_S3_SECRET_KEY")] + #[arg(long, env = "RUSTUS_S3_SECRET_KEY")] pub s3_secret_key: Option, /// S3 URL. /// /// This parameter is required fo s3-based storages. - #[structopt(long, required_if("storage", "hybrid-s3"), env = "RUSTUS_S3_URL")] + #[arg(long, required_if_eq("storage", "hybrid-s3"), env = "RUSTUS_S3_URL")] pub s3_url: Option, /// S3 force path style. /// /// This parameter is required fo s3-based storages. - #[structopt(long, env = "RUSTUS_S3_FORCE_PATH_STYLE")] + #[arg(long, env = "RUSTUS_S3_FORCE_PATH_STYLE")] pub s3_force_path_style: bool, /// S3 security token. /// /// This parameter is required fo s3-based storages. - #[structopt(long, env = "RUSTUS_S3_SECURITY_TOKEN")] + #[arg(long, env = "RUSTUS_S3_SECURITY_TOKEN")] pub s3_security_token: Option, /// S3 session token. /// /// This parameter is required fo s3-based storages. - #[structopt(long, env = "RUSTUS_S3_SESSION_TOKEN")] + #[arg(long, env = "RUSTUS_S3_SESSION_TOKEN")] pub s3_session_token: Option, /// S3 profile. /// /// This parameter is required fo s3-based storages. - #[structopt(long, env = "RUSTUS_S3_PROFILE")] + #[arg(long, env = "RUSTUS_S3_PROFILE")] pub s3_profile: Option, /// Additional S3 headers. @@ -103,11 +103,11 @@ pub struct StorageOptions { /// Useful for configuring ACLs. /// /// This parameter is required fo s3-based storages. - #[structopt(long, env = "RUSTUS_S3_HEADERS")] + #[arg(long, env = "RUSTUS_S3_HEADERS")] pub s3_headers: Option, } -#[derive(StructOpt, Debug, Clone)] +#[derive(Parser, Debug, Clone)] pub struct InfoStoreOptions { /// Type of info storage. /// @@ -117,7 +117,7 @@ pub struct InfoStoreOptions { /// /// This information is used in /// HEAD requests. - #[structopt( + #[arg( long, short, default_value = "file-info-storage", @@ -129,7 +129,7 @@ pub struct InfoStoreOptions { /// /// This directory is used to store .info files /// for `file_info_storage`. - #[structopt(long, default_value = "./data", env = "RUSTUS_INFO_DIR")] + #[arg(long, default_value = "./data", env = "RUSTUS_INFO_DIR")] pub info_dir: PathBuf, /// Connection string for remote info storages. @@ -140,96 +140,99 @@ pub struct InfoStoreOptions { /// /// Value must include all connection details. #[cfg(any(feature = "redis_info_storage", feature = "db_info_storage"))] - #[structopt( + #[arg( long, - required_if("info-storage", "db-info-storage"), - required_if("info-storage", "redis-info-storage"), + required_if_eq_any([("info_storage", "db-info-storage"), ("info_storage", "redis-info-storage")]), env = "RUSTUS_INFO_DB_DSN" )] pub info_db_dsn: Option, } -#[derive(StructOpt, Debug, Clone)] +#[derive(Parser, Debug, Clone)] #[allow(clippy::struct_excessive_bools)] pub struct NotificationsOptions { /// Notifications format. /// /// This format will be used in all /// messages about hooks. - #[structopt(long, default_value = "default", env = "RUSTUS_HOOKS_FORMAT")] + #[arg(long, default_value = "default", env = "RUSTUS_HOOKS_FORMAT")] pub hooks_format: Format, /// Enabled hooks for notifications. - #[structopt( + #[arg( long, default_value = "pre-create,post-create,post-receive,pre-terminate,post-terminate,post-finish", env = "RUSTUS_HOOKS", - use_delimiter = true + use_value_delimiter = true )] pub hooks: Vec, /// Use this option if you use rustus /// behind any proxy. Like Nginx or Traefik. - #[structopt(long, env = "RUSTUS_BEHIND_PROXY")] + #[arg(long, env = "RUSTUS_BEHIND_PROXY")] pub behind_proxy: bool, /// List of URLS to send webhooks to. - #[structopt(long, env = "RUSTUS_HOOKS_HTTP_URLS", use_delimiter = true)] + #[arg(long, env = "RUSTUS_HOOKS_HTTP_URLS", use_value_delimiter = true)] pub hooks_http_urls: Vec, // List of headers to forward from client. - #[structopt(long, env = "RUSTUS_HOOKS_HTTP_PROXY_HEADERS", use_delimiter = true)] + #[arg( + long, + env = "RUSTUS_HOOKS_HTTP_PROXY_HEADERS", + use_value_delimiter = true + )] pub hooks_http_proxy_headers: Vec, /// Url for AMQP server. #[cfg(feature = "amqp_notifier")] - #[structopt(long, env = "RUSTUS_HOOKS_AMQP_URL")] + #[arg(long, env = "RUSTUS_HOOKS_AMQP_URL")] pub hooks_amqp_url: Option, /// Rustus will create exchange if enabled. #[cfg(feature = "amqp_notifier")] - #[structopt(long, env = "RUSTUS_HOOKS_AMQP_DECLARE_EXCHANGE")] + #[arg(long, env = "RUSTUS_HOOKS_AMQP_DECLARE_EXCHANGE")] pub hooks_amqp_declare_exchange: bool, /// Rustus will create all queues for communication and bind them /// to exchange if enabled. #[cfg(feature = "amqp_notifier")] - #[structopt(long, env = "RUSTUS_HOOKS_AMQP_DECLARE_QUEUES")] + #[arg(long, env = "RUSTUS_HOOKS_AMQP_DECLARE_QUEUES")] pub hooks_amqp_declare_queues: bool, /// Durability type of exchange. #[cfg(feature = "amqp_notifier")] - #[structopt(long, env = "RUSTUS_HOOKS_AMQP_DURABLE_EXCHANGE")] + #[arg(long, env = "RUSTUS_HOOKS_AMQP_DURABLE_EXCHANGE")] pub hooks_amqp_durable_exchange: bool, /// Durability type of queues. #[cfg(feature = "amqp_notifier")] - #[structopt(long, env = "RUSTUS_HOOKS_AMQP_DURABLE_QUEUES")] + #[arg(long, env = "RUSTUS_HOOKS_AMQP_DURABLE_QUEUES")] pub hooks_amqp_durable_queues: bool, /// Adds celery specific headers. #[cfg(feature = "amqp_notifier")] - #[structopt(long, env = "RUSTUS_HOOKS_AMQP_CELERY")] + #[arg(long, env = "RUSTUS_HOOKS_AMQP_CELERY")] pub hooks_amqp_celery: bool, /// Name of amqp exchange. #[cfg(feature = "amqp_notifier")] - #[structopt(long, env = "RUSTUS_HOOKS_AMQP_EXCHANGE", default_value = "rustus")] + #[arg(long, env = "RUSTUS_HOOKS_AMQP_EXCHANGE", default_value = "rustus")] pub hooks_amqp_exchange: String, /// Exchange kind. #[cfg(feature = "amqp_notifier")] - #[structopt(long, env = "RUSTUS_HOOKS_AMQP_EXCHANGE_KIND", default_value = "topic")] + #[arg(long, env = "RUSTUS_HOOKS_AMQP_EXCHANGE_KIND", default_value = "topic")] pub hooks_amqp_exchange_kind: String, /// Routing key to use when sending message to an exchange. #[cfg(feature = "amqp_notifier")] - #[structopt(long, env = "RUSTUS_HOOKS_AMQP_ROUTING_KEY")] + #[arg(long, env = "RUSTUS_HOOKS_AMQP_ROUTING_KEY")] pub hooks_amqp_routing_key: Option, /// Prefix for all AMQP queues. #[cfg(feature = "amqp_notifier")] - #[structopt( + #[arg( long, env = "RUSTUS_HOOKS_AMQP_QUEUES_PREFIX", default_value = "rustus" @@ -238,17 +241,17 @@ pub struct NotificationsOptions { /// Directory for executable hook files. /// This parameter is used to call executables from dir. - #[structopt(long, env = "RUSTUS_HOOKS_DIR")] + #[arg(long, env = "RUSTUS_HOOKS_DIR")] pub hooks_dir: Option, /// Executable file which must be called for /// notifying about upload status. - #[structopt(long, env = "RUSTUS_HOOKS_FILE")] + #[arg(long, env = "RUSTUS_HOOKS_FILE")] pub hooks_file: Option, } -#[derive(Debug, StructOpt, Clone)] -#[structopt(name = "Rustus")] +#[derive(Debug, Parser, Clone)] +#[command(name = "Rustus")] /// Tus protocol implementation. /// /// This program is a web-server that @@ -258,51 +261,51 @@ pub struct NotificationsOptions { /// [here](https://tus.io/). pub struct RustusConf { /// Rustus server host - #[structopt(short, long, default_value = "0.0.0.0", env = "RUSTUS_SERVER_HOST")] + #[arg(long, default_value = "0.0.0.0", env = "RUSTUS_SERVER_HOST")] pub host: String, /// Rustus server port - #[structopt(short, long, default_value = "1081", env = "RUSTUS_SERVER_PORT")] + #[arg(long, default_value = "1081", env = "RUSTUS_SERVER_PORT")] pub port: u16, - #[structopt(long, env = "RUSTUS_DISABLE_HEALTH_ACCESS_LOG")] + #[arg(long, env = "RUSTUS_DISABLE_HEALTH_ACCESS_LOG")] pub disable_health_access_log: bool, /// Rustus base API url - #[structopt(long, default_value = "/files", env = "RUSTUS_URL")] + #[arg(long, default_value = "/files", env = "RUSTUS_URL")] pub url: String, /// Allowed hosts for CORS protocol. /// /// By default all hosts are allowed. - #[structopt(long, env = "RUSTUS_CORS", use_delimiter = true)] + #[arg(long, env = "RUSTUS_CORS", use_value_delimiter = true)] pub cors: Vec, /// Maximum payload size. /// /// This limit used to reduce amount of consumed memory. - #[structopt( + #[arg( long, - short = "mbs", + short = 'm', default_value = "262144", env = "RUSTUS_MAX_BODY_SIZE" )] pub max_body_size: usize, /// Rustus maximum log level - #[structopt(long, default_value = "INFO", env = "RUSTUS_LOG_LEVEL")] + #[arg(long, default_value = "INFO", env = "RUSTUS_LOG_LEVEL")] pub log_level: log::LevelFilter, /// Number of actix workers default value = number of cpu cores. - #[structopt(long, short, env = "RUSTUS_WORKERS")] + #[arg(long, short, env = "RUSTUS_WORKERS")] pub workers: Option, /// Enabled extensions for TUS protocol. - #[structopt( + #[arg( long, default_value = "getting,creation,termination,creation-with-upload,creation-defer-length,concatenation,checksum", env = "RUSTUS_TUS_EXTENSIONS", - use_delimiter = true + use_value_delimiter = true )] pub tus_extensions: Vec, @@ -310,16 +313,16 @@ pub struct RustusConf { /// By default rustus does nothing with part files after concatenation. /// /// This parameter is only needed if concatenation extension is enabled. - #[structopt(long, env = "RUSTUS_REMOVE_PARTS")] + #[arg(long, env = "RUSTUS_REMOVE_PARTS")] pub remove_parts: bool, - #[structopt(flatten)] + #[command(flatten)] pub storage_opts: StorageOptions, - #[structopt(flatten)] + #[command(flatten)] pub info_storage_opts: InfoStoreOptions, - #[structopt(flatten)] + #[command(flatten)] pub notification_opts: NotificationsOptions, } @@ -330,7 +333,7 @@ impl RustusConf { /// This is a workaround for issue mentioned /// [here](https://www.reddit.com/r/rust/comments/8ddd19/confusion_with_splitting_mainrs_into_smaller/). pub fn from_args() -> RustusConf { - let mut conf = ::from_args(); + let mut conf = RustusConf::parse(); conf.normalize_extentions(); conf } @@ -340,7 +343,7 @@ impl RustusConf { I: IntoIterator, I::Item: Into + Clone, { - ::from_iter(iter) + ::parse_from(iter) } /// Base API url. diff --git a/src/errors.rs b/src/errors.rs index cc6be4d..0b40092 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -28,10 +28,10 @@ pub enum RustusError { DatabaseError(#[from] rbatis::error::Error), #[cfg(feature = "redis_info_storage")] #[error("Redis error: {0}")] - RedisError(#[from] mobc_redis::redis::RedisError), + RedisError(#[from] redis::RedisError), #[cfg(feature = "redis_info_storage")] - #[error("Redis error: {0}")] - MobcError(#[from] mobc_redis::mobc::Error), + #[error("Redis pooling error: {0}")] + MobcError(#[from] bb8::RunError), #[error("Unable to get file information")] UnableToReadInfo, #[error("Unable to write file {0}")] @@ -54,8 +54,8 @@ pub enum RustusError { #[error("AMQP error: {0}")] AMQPError(#[from] lapin::Error), #[cfg(feature = "amqp_notifier")] - #[error("AMQP error: {0}")] - AMQPPoolError(#[from] mobc_lapin::mobc::Error), + #[error("AMQP pooling error error: {0}")] + AMQPPoolError(#[from] bb8::RunError), #[error("Std error: {0}")] StdError(#[from] std::io::Error), #[error("Can't spawn task: {0}")] diff --git a/src/info_storages/models/file_info.rs b/src/info_storages/models/file_info.rs index 6d55f1d..d99dec1 100644 --- a/src/info_storages/models/file_info.rs +++ b/src/info_storages/models/file_info.rs @@ -1,6 +1,7 @@ use std::collections::HashMap; use crate::{errors::RustusError, RustusResult}; +use base64::{engine::general_purpose, Engine}; use chrono::{serde::ts_seconds, DateTime, Utc}; use log::error; use serde::{Deserialize, Serialize}; @@ -76,7 +77,7 @@ impl FileInfo { // Getting all metadata keys. for (key, val) in &self.metadata { - let encoded_value = base64::encode(val); + let encoded_value = general_purpose::STANDARD.encode(val); // Adding metadata entry to the list. result.push(format!("{key} {encoded_value}")); } diff --git a/src/info_storages/redis_info_storage.rs b/src/info_storages/redis_info_storage.rs index 2abb356..4e7b946 100644 --- a/src/info_storages/redis_info_storage.rs +++ b/src/info_storages/redis_info_storage.rs @@ -1,5 +1,9 @@ use async_trait::async_trait; -use mobc_redis::{mobc::Pool, redis, RedisConnectionManager}; +// use mobc_redis::{mobc::Pool, redis, RedisConnectionManager}; +// use redis::aio::Connection; + +use bb8::Pool; +use bb8_redis::RedisConnectionManager; use redis::aio::Connection; use crate::{ @@ -15,9 +19,8 @@ pub struct RedisStorage { impl RedisStorage { #[allow(clippy::unused_async)] pub async fn new(db_dsn: &str) -> RustusResult { - let client = redis::Client::open(db_dsn)?; - let manager = RedisConnectionManager::new(client); - let pool = Pool::builder().max_open(100).build(manager); + let manager = RedisConnectionManager::new(db_dsn)?; + let pool = bb8::Pool::builder().max_size(100).build(manager).await?; Ok(Self { pool }) } } @@ -69,7 +72,7 @@ impl InfoStorage for RedisStorage { mod tests { use super::RedisStorage; use crate::{info_storages::FileInfo, InfoStorage}; - use mobc_redis::{redis, redis::AsyncCommands}; + use redis::AsyncCommands; async fn get_storage() -> RedisStorage { let redis_url = std::env::var("TEST_REDIS_URL").unwrap(); diff --git a/src/main.rs b/src/main.rs index d7400fc..eb8fb3e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -290,6 +290,7 @@ fn setup_logging(app_config: &RustusConf) -> RustusResult<()> { #[cfg_attr(coverage, no_coverage)] #[tokio::main] async fn main() -> std::io::Result<()> { + dotenvy::dotenv().ok(); let app_conf = RustusConf::from_args(); // Configuring logging. // I may change it to another log system like `fern` later, idk. diff --git a/src/notifiers/amqp_notifier.rs b/src/notifiers/amqp_notifier.rs index f5f7727..8a08aa3 100644 --- a/src/notifiers/amqp_notifier.rs +++ b/src/notifiers/amqp_notifier.rs @@ -4,14 +4,14 @@ use crate::{ }; use actix_web::http::header::HeaderMap; use async_trait::async_trait; +use bb8::Pool; +use bb8_lapin::LapinConnectionManager; use lapin::{ options::{BasicPublishOptions, ExchangeDeclareOptions, QueueBindOptions, QueueDeclareOptions}, types::{AMQPValue, FieldTable, LongString}, BasicProperties, ConnectionProperties, ExchangeKind, }; -use mobc_lapin::{mobc::Pool, RMQConnectionManager}; use strum::IntoEnumIterator; -use tokio_amqp::LapinTokioExt; #[allow(clippy::struct_excessive_bools)] #[derive(Clone)] @@ -25,7 +25,7 @@ pub struct DeclareOptions { #[derive(Clone)] pub struct AMQPNotifier { exchange_name: String, - pool: Pool, + pool: Pool, queues_prefix: String, exchange_kind: String, routing_key: Option, @@ -35,7 +35,7 @@ pub struct AMQPNotifier { impl AMQPNotifier { #[allow(clippy::fn_params_excessive_bools)] - pub fn new( + pub async fn new( amqp_url: &str, exchange: &str, queues_prefix: &str, @@ -43,13 +43,11 @@ impl AMQPNotifier { routing_key: Option, declare_options: DeclareOptions, celery: bool, - ) -> Self { - let manager = RMQConnectionManager::new( - amqp_url.into(), - ConnectionProperties::default().with_tokio(), - ); - let pool = Pool::::builder().build(manager); - Self { + ) -> RustusResult { + let manager = LapinConnectionManager::new(amqp_url, ConnectionProperties::default()); + let pool = bb8::Pool::builder().build(manager).await?; + + Ok(Self { pool, celery, routing_key, @@ -57,7 +55,7 @@ impl AMQPNotifier { exchange_kind: exchange_kind.into(), exchange_name: exchange.into(), queues_prefix: queues_prefix.into(), - } + }) } /// Generate queue name based on hook type. @@ -143,7 +141,7 @@ impl Notifier for AMQPNotifier { self.exchange_name.as_str(), routing_key.as_str(), BasicPublishOptions::default(), - payload, + payload.as_slice(), BasicProperties::default() .with_headers(headers) .with_content_type("application/json".into()) @@ -177,7 +175,9 @@ mod tests { durable_exchange: false, }, true, - ); + ) + .await + .unwrap(); notifier.prepare().await.unwrap(); notifier } @@ -208,7 +208,7 @@ mod tests { .unwrap(); assert!(message.is_some()); assert_eq!( - String::from_utf8(message.clone().unwrap().data.clone()).unwrap(), + String::from_utf8(message.as_ref().unwrap().data.clone()).unwrap(), format!("[[{}], {{}}, {{}}]", test_msg) ); message @@ -233,7 +233,9 @@ mod tests { durable_exchange: false, }, false, - ); + ) + .await + .unwrap(); let res = notifier .send_message("Test Message".into(), Hook::PostCreate, &HeaderMap::new()) .await; diff --git a/src/notifiers/dir_notifier.rs b/src/notifiers/dir_notifier.rs index c354efa..d921974 100644 --- a/src/notifiers/dir_notifier.rs +++ b/src/notifiers/dir_notifier.rs @@ -37,8 +37,7 @@ impl Notifier for DirNotifier { if !hook_path.exists() { debug!("Hook {} not found.", hook.to_string()); return Err(RustusError::HookError(format!( - "Hook file {} not found.", - hook + "Hook file {hook} not found." ))); } debug!("Running hook: {}", hook_path.as_path().display()); diff --git a/src/notifiers/models/notification_manager.rs b/src/notifiers/models/notification_manager.rs index 51c5777..5326250 100644 --- a/src/notifiers/models/notification_manager.rs +++ b/src/notifiers/models/notification_manager.rs @@ -48,9 +48,8 @@ impl NotificationManager { #[cfg(feature = "amqp_notifier")] if rustus_config.notification_opts.hooks_amqp_url.is_some() { debug!("Found AMQP notifier."); - manager - .notifiers - .push(Box::new(amqp_notifier::AMQPNotifier::new( + manager.notifiers.push(Box::new( + amqp_notifier::AMQPNotifier::new( rustus_config .notification_opts .hooks_amqp_url @@ -80,7 +79,9 @@ impl NotificationManager { durable_queues: rustus_config.notification_opts.hooks_amqp_durable_queues, }, rustus_config.notification_opts.hooks_amqp_celery, - ))); + ) + .await?, + )); } for notifier in &mut manager.notifiers.iter_mut() { notifier.prepare().await?; diff --git a/src/protocol/core/get_info.rs b/src/protocol/core/get_info.rs index bd735b7..94bbd3a 100644 --- a/src/protocol/core/get_info.rs +++ b/src/protocol/core/get_info.rs @@ -65,6 +65,8 @@ mod tests { use crate::{server::test::get_service, State}; use actix_web::test::{call_service, TestRequest}; + use base64::{engine::general_purpose, Engine}; + #[actix_rt::test] async fn success() { let state = State::test_new().await; @@ -117,7 +119,7 @@ mod tests { .unwrap(); assert_eq!( String::from(metadata), - format!("{} {}", "test", base64::encode("value")) + format!("{} {}", "test", general_purpose::STANDARD.encode("value")) ) } diff --git a/src/protocol/creation/routes.rs b/src/protocol/creation/routes.rs index 48e0059..272c567 100644 --- a/src/protocol/creation/routes.rs +++ b/src/protocol/creation/routes.rs @@ -1,6 +1,6 @@ -use std::collections::HashMap; - use actix_web::{web, web::Bytes, HttpRequest, HttpResponse}; +use base64::{engine::general_purpose, Engine}; +use std::collections::HashMap; use crate::{ info_storages::FileInfo, @@ -38,8 +38,9 @@ fn get_metadata(request: &HttpRequest) -> Option> { if key.is_none() || b64val.is_none() { continue; } - let value = - base64::decode(b64val.unwrap()).map(|value| match String::from_utf8(value) { + let value = general_purpose::STANDARD + .decode(b64val.unwrap()) + .map(|value| match String::from_utf8(value) { Ok(val) => Some(val), Err(_) => None, }); @@ -258,6 +259,7 @@ mod tests { test::{call_service, TestRequest}, web, }; + use base64::{engine::general_purpose, Engine}; #[actix_rt::test] async fn success() { @@ -459,8 +461,8 @@ mod tests { "Upload-Metadata", format!( "test {}, pest {}", - base64::encode("data1"), - base64::encode("data2") + general_purpose::STANDARD.encode("data1"), + general_purpose::STANDARD.encode("data2") ), )) .to_request(); @@ -492,7 +494,10 @@ mod tests { .insert_header(("Upload-Length", 100)) .insert_header(( "Upload-Metadata", - format!("test data1, pest {}", base64::encode("data")), + format!( + "test data1, pest {}", + general_purpose::STANDARD.encode("data") + ), )) .to_request(); let resp = call_service(&mut rustus, request).await; diff --git a/src/utils/hashes.rs b/src/utils/hashes.rs index 28536ee..8a242d6 100644 --- a/src/utils/hashes.rs +++ b/src/utils/hashes.rs @@ -1,5 +1,6 @@ use crate::{errors::RustusError, RustusResult}; use actix_web::http::header::HeaderValue; +use base64::Engine; use digest::Digest; /// Checks if hash-sum of a slice matches the given checksum. @@ -44,10 +45,12 @@ pub fn verify_chunk_checksum(header: &HeaderValue, data: &[u8]) -> RustusResult< let mut split = val.split(' '); if let Some(algo) = split.next() { if let Some(checksum_base) = split.next() { - let checksum = base64::decode(checksum_base).map_err(|_| { - log::error!("Can't decode checksum value"); - RustusError::WrongHeaderValue - })?; + let checksum = base64::engine::general_purpose::STANDARD + .decode(checksum_base) + .map_err(|_| { + log::error!("Can't decode checksum value"); + RustusError::WrongHeaderValue + })?; return checksum_verify(algo, data, checksum.as_slice()); } } From 890a1984bce08405812eb5b00234ed7fe39b5f96 Mon Sep 17 00:00:00 2001 From: Pavel Kirilin Date: Thu, 9 Mar 2023 22:56:58 +0400 Subject: [PATCH 2/7] Refactored metrics. (#116) --- src/main.rs | 50 +++---------- src/metrics.rs | 109 +++++++++++++---------------- src/protocol/core/write_bytes.rs | 7 +- src/protocol/creation/routes.rs | 10 ++- src/protocol/termination/routes.rs | 4 +- src/server.rs | 9 +-- 6 files changed, 70 insertions(+), 119 deletions(-) diff --git a/src/main.rs b/src/main.rs index eb8fb3e..c8395ad 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,7 +3,7 @@ #[global_allocator] static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; -use std::{collections::HashMap, str::FromStr}; +use std::str::FromStr; use actix_cors::Cors; use actix_web::{ @@ -19,7 +19,7 @@ use log::{error, LevelFilter}; use config::RustusConf; -use metrics::{ActiveUploads, FinishedUploads, StartedUploads, TerminatedUploads, UploadSizes}; +use metrics::RustusMetrics; use wildmatch::WildMatch; use crate::{ @@ -155,60 +155,26 @@ pub fn create_server(state: State) -> RustusResult { .notification_opts .hooks_http_proxy_headers .clone(); - let metrics = actix_web_prom::PrometheusMetricsBuilder::new("") + let metrics = RustusMetrics::new()?; + let metrics_middleware = actix_web_prom::PrometheusMetricsBuilder::new("") .endpoint("/metrics") + .registry(metrics.registry.clone()) .build() .map_err(|err| { error!("{}", err); RustusError::Unknown })?; - let active_uploads = ActiveUploads::new()?; - let upload_sizes = UploadSizes::new()?; - let started_uploads = StartedUploads::new()?; - let finished_uploads = FinishedUploads::new()?; - let terminated_uploads = TerminatedUploads::new()?; - let found_errors = prometheus::IntCounterVec::new( - prometheus::Opts { - namespace: String::new(), - subsystem: String::new(), - name: "errors".into(), - help: "Found errors".into(), - const_labels: HashMap::new(), - variable_labels: Vec::new(), - }, - &["path", "description"], - )?; - metrics - .registry - .register(Box::new(active_uploads.gauge.clone()))?; - metrics - .registry - .register(Box::new(upload_sizes.hist.clone()))?; - metrics - .registry - .register(Box::new(started_uploads.counter.clone()))?; - metrics - .registry - .register(Box::new(finished_uploads.counter.clone()))?; - metrics - .registry - .register(Box::new(terminated_uploads.counter.clone()))?; - metrics.registry.register(Box::new(found_errors.clone()))?; let mut server = HttpServer::new(move || { let mut logger = middleware::Logger::new("\"%r\" \"-\" \"%s\" \"%a\" \"%D\""); if disable_health_log { logger = logger.exclude("/health"); } - let error_metrics = found_errors.clone(); + let error_metrics = metrics.found_errors.clone(); App::new() - .app_data(web::Data::new(active_uploads.clone())) - .app_data(web::Data::new(started_uploads.clone())) - .app_data(web::Data::new(finished_uploads.clone())) - .app_data(web::Data::new(terminated_uploads.clone())) - .app_data(web::Data::new(upload_sizes.clone())) + .app_data(web::Data::new(metrics.clone())) .route("/health", web::get().to(routes::health_check)) .configure(rustus_service(state.clone())) - .wrap(metrics.clone()) + .wrap(metrics_middleware.clone()) .wrap(logger) .wrap(create_cors(cors_hosts.clone(), proxy_headers.clone())) // Middleware that overrides method of a request if diff --git a/src/metrics.rs b/src/metrics.rs index 43fc727..90b0e7c 100644 --- a/src/metrics.rs +++ b/src/metrics.rs @@ -1,70 +1,61 @@ -use crate::errors::RustusResult; - -#[derive(Clone)] -pub struct StartedUploads { - pub counter: prometheus::IntCounter, -} - -impl StartedUploads { - pub fn new() -> RustusResult { - Ok(Self { - counter: prometheus::IntCounter::new("started_uploads", "Number of created uploads")?, - }) - } -} -#[derive(Clone)] -pub struct FinishedUploads { - pub counter: prometheus::IntCounter, -} - -impl FinishedUploads { - pub fn new() -> RustusResult { - Ok(Self { - counter: prometheus::IntCounter::new("finished_uploads", "Number of finished uploads")?, - }) - } -} +use std::collections::HashMap; -#[derive(Clone)] -pub struct ActiveUploads { - pub gauge: prometheus::IntGauge, -} -impl ActiveUploads { - pub fn new() -> RustusResult { - Ok(Self { - gauge: prometheus::IntGauge::new("active_uploads", "Number of active file uploads")?, - }) - } -} +use crate::errors::RustusResult; +#[allow(clippy::module_name_repetitions)] #[derive(Clone)] -pub struct UploadSizes { - pub hist: prometheus::Histogram, +pub struct RustusMetrics { + pub started_uploads: prometheus::IntCounter, + pub finished_uploads: prometheus::IntCounter, + pub active_uploads: prometheus::IntGauge, + pub upload_sizes: prometheus::Histogram, + pub terminated_uploads: prometheus::IntCounter, + pub found_errors: prometheus::IntCounterVec, + pub registry: prometheus::Registry, } -impl UploadSizes { +impl RustusMetrics { pub fn new() -> RustusResult { - Ok(Self { - hist: prometheus::Histogram::with_opts( - prometheus::HistogramOpts::new("uploads_sizes", "Size of uploaded files in bytes") - .buckets(prometheus::exponential_buckets(2., 2., 40)?), - )?, - }) - } -} + let registry = prometheus::Registry::new(); + let started_uploads = + prometheus::IntCounter::new("started_uploads", "Number of created uploads")?; + let finished_uploads = + prometheus::IntCounter::new("finished_uploads", "Number of finished uploads")?; + let active_uploads = + prometheus::IntGauge::new("active_uploads", "Number of active file uploads")?; + let upload_sizes = prometheus::Histogram::with_opts( + prometheus::HistogramOpts::new("uploads_sizes", "Size of uploaded files in bytes") + .buckets(prometheus::exponential_buckets(2., 2., 40)?), + )?; + let terminated_uploads = + prometheus::IntCounter::new("terminated_uploads", "Number of terminated uploads")?; + let found_errors = prometheus::IntCounterVec::new( + prometheus::Opts { + namespace: String::new(), + subsystem: String::new(), + name: "errors".into(), + help: "Found errors".into(), + const_labels: HashMap::new(), + variable_labels: Vec::new(), + }, + &["path", "description"], + )?; + + registry.register(Box::new(started_uploads.clone()))?; + registry.register(Box::new(finished_uploads.clone()))?; + registry.register(Box::new(active_uploads.clone()))?; + registry.register(Box::new(upload_sizes.clone()))?; + registry.register(Box::new(terminated_uploads.clone()))?; + registry.register(Box::new(found_errors.clone()))?; -#[derive(Clone)] -pub struct TerminatedUploads { - pub counter: prometheus::IntCounter, -} - -impl TerminatedUploads { - pub fn new() -> RustusResult { Ok(Self { - counter: prometheus::IntCounter::new( - "terminated_uploads", - "Number of terminated uploads", - )?, + started_uploads, + finished_uploads, + active_uploads, + upload_sizes, + terminated_uploads, + found_errors, + registry, }) } } diff --git a/src/protocol/core/write_bytes.rs b/src/protocol/core/write_bytes.rs index 5ff6444..c080715 100644 --- a/src/protocol/core/write_bytes.rs +++ b/src/protocol/core/write_bytes.rs @@ -21,8 +21,7 @@ pub async fn write_bytes( request: HttpRequest, bytes: Bytes, state: web::Data, - active_uploads: web::Data, - finished_uploads: web::Data, + metrics: web::Data, ) -> RustusResult { // Checking if request has required headers. let check_content_type = |val: &str| val == "application/offset+octet-stream"; @@ -138,8 +137,8 @@ pub async fn write_bytes( } if hook == Hook::PostFinish { - active_uploads.gauge.dec(); - finished_uploads.counter.inc(); + metrics.active_uploads.dec(); + metrics.finished_uploads.inc(); } Ok(HttpResponse::NoContent() diff --git a/src/protocol/creation/routes.rs b/src/protocol/creation/routes.rs index 272c567..c191fe8 100644 --- a/src/protocol/creation/routes.rs +++ b/src/protocol/creation/routes.rs @@ -73,9 +73,7 @@ fn get_upload_parts(request: &HttpRequest) -> Vec { /// extension is enabled. #[allow(clippy::too_many_lines)] pub async fn create_file( - active_uploads: web::Data, - file_sizes: web::Data, - started_uploads: web::Data, + metrics: web::Data, state: web::Data, request: HttpRequest, bytes: Bytes, @@ -152,12 +150,12 @@ pub async fn create_file( // Incrementing number of active uploads - active_uploads.gauge.inc(); - started_uploads.counter.inc(); + metrics.active_uploads.inc(); + metrics.started_uploads.inc(); if let Some(length) = file_info.length { #[allow(clippy::cast_precision_loss)] - file_sizes.hist.observe(length as f64); + metrics.upload_sizes.observe(length as f64); } if file_info.is_final { diff --git a/src/protocol/termination/routes.rs b/src/protocol/termination/routes.rs index 2221819..067e239 100644 --- a/src/protocol/termination/routes.rs +++ b/src/protocol/termination/routes.rs @@ -14,7 +14,7 @@ use crate::{ pub async fn terminate( request: HttpRequest, state: web::Data, - terminated_uploads: web::Data, + metrics: web::Data, ) -> RustusResult { let file_id_opt = request.match_info().get("file_id").map(String::from); if let Some(file_id) = file_id_opt { @@ -36,7 +36,7 @@ pub async fn terminate( } state.info_storage.remove_info(file_id.as_str()).await?; state.data_storage.remove_file(&file_info).await?; - terminated_uploads.counter.inc(); + metrics.terminated_uploads.inc(); if state.config.hook_is_active(Hook::PostTerminate) { let message = state.config.notification_opts.hooks_format.format( &request, diff --git a/src/server.rs b/src/server.rs index 8f71ca5..6a64328 100644 --- a/src/server.rs +++ b/src/server.rs @@ -24,7 +24,7 @@ pub fn rustus_service(state: State) -> impl Fn(&mut web::ServiceConfig) { #[cfg(test)] pub mod test { use super::rustus_service; - use crate::{metrics, state::State}; + use crate::{metrics::RustusMetrics, state::State}; use actix_web::{dev::ServiceResponse, test::init_service, web, App}; pub async fn get_service( @@ -34,13 +34,10 @@ pub mod test { Response = ServiceResponse, Error = actix_web::Error, > { + let metrics = RustusMetrics::new().unwrap(); init_service( App::new() - .app_data(web::Data::new(metrics::ActiveUploads::new().unwrap())) - .app_data(web::Data::new(metrics::StartedUploads::new().unwrap())) - .app_data(web::Data::new(metrics::FinishedUploads::new().unwrap())) - .app_data(web::Data::new(metrics::TerminatedUploads::new().unwrap())) - .app_data(web::Data::new(metrics::UploadSizes::new().unwrap())) + .app_data(web::Data::new(metrics)) .configure(rustus_service(state.clone())), ) .await From f5e1792f0448b1e0ed4b706007148721d1b2c6ce Mon Sep 17 00:00:00 2001 From: Pavel Kirilin Date: Fri, 10 Mar 2023 02:14:28 +0400 Subject: [PATCH 3/7] Added sentry integration. (#117) --- Cargo.lock | 227 ++++++++++++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 2 + src/config.rs | 17 ++++ src/main.rs | 16 ++++ 4 files changed, 262 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 146a9ec..07cfbd1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -234,6 +234,15 @@ dependencies = [ "prometheus", ] +[[package]] +name = "addr2line" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +dependencies = [ + "gimli", +] + [[package]] name = "adler" version = "1.0.2" @@ -538,6 +547,21 @@ dependencies = [ "thiserror", ] +[[package]] +name = "backtrace" +version = "0.3.67" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base-x" version = "0.2.11" @@ -1114,6 +1138,16 @@ dependencies = [ "syn", ] +[[package]] +name = "debugid" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" +dependencies = [ + "serde", + "uuid 1.3.0", +] + [[package]] name = "der" version = "0.5.1" @@ -1284,6 +1318,18 @@ dependencies = [ "log", ] +[[package]] +name = "findshlibs" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40b9e59cd0f7e0806cca4be089683ecb6434e602038df21fe6bf6711b2f07f64" +dependencies = [ + "cc", + "lazy_static", + "libc", + "winapi", +] + [[package]] name = "flate2" version = "1.0.25" @@ -1478,6 +1524,12 @@ dependencies = [ "wasi 0.11.0+wasi-snapshot-preview1", ] +[[package]] +name = "gimli" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" + [[package]] name = "h2" version = "0.3.16" @@ -1578,6 +1630,17 @@ dependencies = [ "digest", ] +[[package]] +name = "hostname" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" +dependencies = [ + "libc", + "match_cfg", + "winapi", +] + [[package]] name = "html_parser" version = "0.6.3" @@ -1946,6 +2009,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "match_cfg" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" + [[package]] name = "maybe-async" version = "0.2.7" @@ -2136,6 +2205,15 @@ dependencies = [ "libc", ] +[[package]] +name = "object" +version = "0.30.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" version = "1.17.1" @@ -2207,6 +2285,17 @@ dependencies = [ "hashbrown 0.12.3", ] +[[package]] +name = "os_info" +version = "3.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c424bc68d15e0778838ac013b5b3449544d8133633d8016319e7e05a820b8c0" +dependencies = [ + "log", + "serde", + "winapi", +] + [[package]] name = "os_str_bytes" version = "6.4.1" @@ -2966,6 +3055,12 @@ dependencies = [ "serde_json", ] +[[package]] +name = "rustc-demangle" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" + [[package]] name = "rustc_version" version = "0.2.3" @@ -3092,6 +3187,8 @@ dependencies = [ "redis", "reqwest", "rust-s3", + "sentry", + "sentry-actix", "serde", "serde_json", "sha1 0.10.5", @@ -3227,6 +3324,112 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +[[package]] +name = "sentry" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5ce6d3512e2617c209ec1e86b0ca2fea06454cd34653c91092bf0f3ec41f8e3" +dependencies = [ + "httpdate", + "native-tls", + "reqwest", + "sentry-backtrace", + "sentry-contexts", + "sentry-core", + "sentry-debug-images", + "sentry-panic", + "tokio", + "ureq", +] + +[[package]] +name = "sentry-actix" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c210068218470670c03fbe59f53944061f9b1fcdb7748f9326248ab1ddf56238" +dependencies = [ + "actix-web", + "futures-util", + "sentry-core", +] + +[[package]] +name = "sentry-backtrace" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7fe408d4d1f8de188a9309916e02e129cbe51ca19e55badea5a64899399b1a" +dependencies = [ + "backtrace", + "once_cell", + "regex", + "sentry-core", +] + +[[package]] +name = "sentry-contexts" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5695096a059a89973ec541062d331ff4c9aeef9c2951416c894f0fff76340e7d" +dependencies = [ + "hostname", + "libc", + "os_info", + "rustc_version 0.4.0", + "sentry-core", + "uname", +] + +[[package]] +name = "sentry-core" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b22828bfd118a7b660cf7a155002a494755c0424cebb7061e4743ecde9c7dbc" +dependencies = [ + "once_cell", + "rand 0.8.5", + "sentry-types", + "serde", + "serde_json", +] + +[[package]] +name = "sentry-debug-images" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a9164d44a2929b1b7670afd7e87552514b70d3ae672ca52884639373d912a3d" +dependencies = [ + "findshlibs", + "once_cell", + "sentry-core", +] + +[[package]] +name = "sentry-panic" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f4ced2a7a8c14899d58eec402d946f69d5ed26a3fc363a7e8b1e5cb88473a01" +dependencies = [ + "sentry-backtrace", + "sentry-core", +] + +[[package]] +name = "sentry-types" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "360ee3270f7a4a1eee6c667f7d38360b995431598a73b740dfe420da548d9cc9" +dependencies = [ + "debugid", + "getrandom", + "hex", + "serde", + "serde_json", + "thiserror", + "time 0.3.20", + "url", + "uuid 1.3.0", +] + [[package]] name = "serde" version = "1.0.152" @@ -3914,6 +4117,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" +[[package]] +name = "uname" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b72f89f0ca32e4db1c04e2a72f5345d59796d4866a1ee0609084569f73683dc8" +dependencies = [ + "libc", +] + [[package]] name = "unicase" version = "2.6.0" @@ -3962,6 +4174,19 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +[[package]] +name = "ureq" +version = "2.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "338b31dd1314f68f3aabf3ed57ab922df95ffcd902476ca7ba3c4ce7b908c46d" +dependencies = [ + "base64 0.13.1", + "log", + "native-tls", + "once_cell", + "url", +] + [[package]] name = "url" version = "2.3.1" @@ -3971,6 +4196,7 @@ dependencies = [ "form_urlencoded", "idna", "percent-encoding", + "serde", ] [[package]] @@ -3990,6 +4216,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1674845326ee10d37ca60470760d4288a6f80f304007d92e5c53bab78c9cfd79" dependencies = [ "getrandom", + "serde", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 99f2cb8..12fbb70 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,6 +35,8 @@ digest = "0.10.3" mimalloc = { version = "~0.1.30", default-features = false } clap = { version = "4.1.8", features = ["derive", "env"] } dotenvy = { version = "0.15.6", features = ["clap"] } +sentry = "0.30.0" +sentry-actix = "0.30.0" [dependencies.sha1] version = "^0.10.1" diff --git a/src/config.rs b/src/config.rs index 4aabffe..7790ecc 100644 --- a/src/config.rs +++ b/src/config.rs @@ -250,6 +250,20 @@ pub struct NotificationsOptions { pub hooks_file: Option, } +#[derive(Debug, Parser, Clone)] +pub struct SentryOptions { + #[arg(name = "sentry-dsn", long, env = "RUSTUS_SENTRY_DSN")] + pub dsn: Option, + + #[arg( + name = "sentry-sample-rate", + long, + default_value = "0.5", + env = "RUSTUS_SENTRY_SAMPLE_RATE" + )] + pub sample_rate: f32, +} + #[derive(Debug, Parser, Clone)] #[command(name = "Rustus")] /// Tus protocol implementation. @@ -324,6 +338,9 @@ pub struct RustusConf { #[command(flatten)] pub notification_opts: NotificationsOptions, + + #[command(flatten)] + pub sentry_opts: SentryOptions, } #[cfg_attr(coverage, no_coverage)] diff --git a/src/main.rs b/src/main.rs index c8395ad..7c22b5e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -177,6 +177,7 @@ pub fn create_server(state: State) -> RustusResult { .wrap(metrics_middleware.clone()) .wrap(logger) .wrap(create_cors(cors_hosts.clone(), proxy_headers.clone())) + .wrap(sentry_actix::Sentry::new()) // Middleware that overrides method of a request if // "X-HTTP-Method-Override" header is provided. .wrap_fn(|mut req, srv| { @@ -261,6 +262,21 @@ async fn main() -> std::io::Result<()> { // Configuring logging. // I may change it to another log system like `fern` later, idk. setup_logging(&app_conf)?; + + #[allow(clippy::no_effect_underscore_binding)] + let mut _guard = None; + if let Some(dsn) = &app_conf.sentry_opts.dsn { + log::info!("Setting up sentry ."); + _guard = Some(sentry::init(( + dsn.as_str(), + sentry::ClientOptions { + debug: true, + sample_rate: app_conf.sentry_opts.sample_rate, + ..Default::default() + }, + ))); + } + // Printing cool message. greeting(&app_conf); From a4cc324f7a99714b5b73d143e895e6e92194dec7 Mon Sep 17 00:00:00 2001 From: Pavel Kirilin Date: Fri, 10 Mar 2023 02:31:05 +0400 Subject: [PATCH 4/7] Fixed docs for sentry. Signed-off-by: Pavel Kirilin --- docs/configuration.md | 20 ++++++++++++++++++++ src/config.rs | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/docs/configuration.md b/docs/configuration.md index 671685b..22e8ef7 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -58,6 +58,26 @@ Also you can disable access log for `/health` endpoint, by using `--disable-heal ``` +## Sentry integration + +If you have sentry and want to see all erros in your sentry project, +please provide sentry-dsn to rustus. + +=== "CLI" + + ``` bash + rustus --sentry-dsn "https://user@sentry-instance.com/11" \ + --sentry-sample-rate 1.0 + ``` + +=== "ENV" + + ``` bash + export RUSTUS_SENTRY_DSN="https://user@sentry-instance.com/11" + export RUSTUS_SENTRY_SAMPLE_RATE="1.0" + + rustus + ``` ## Configuring storage diff --git a/src/config.rs b/src/config.rs index 7790ecc..4481369 100644 --- a/src/config.rs +++ b/src/config.rs @@ -258,7 +258,7 @@ pub struct SentryOptions { #[arg( name = "sentry-sample-rate", long, - default_value = "0.5", + default_value = "1.0", env = "RUSTUS_SENTRY_SAMPLE_RATE" )] pub sample_rate: f32, From 7f07d4c56eacb0503c875cadf46a0e0552c1a23d Mon Sep 17 00:00:00 2001 From: Pavel Kirilin Date: Mon, 13 Mar 2023 04:00:50 +0400 Subject: [PATCH 5/7] Deps updates, docs udpate. Signed-off-by: Pavel Kirilin --- Cargo.lock | 124 +++++++++++++++++++++++++------------------------- docs/index.md | 4 +- 2 files changed, 65 insertions(+), 63 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 07cfbd1..678062f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -650,9 +650,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "block-buffer" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array", ] @@ -687,7 +687,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40f9ca3698b2e4cb7c15571db0abc5551dca417a21ae8140460b50309bb2cc62" dependencies = [ "borsh-derive", - "hashbrown 0.12.3", + "hashbrown 0.13.2", ] [[package]] @@ -793,9 +793,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" [[package]] name = "bytestring" @@ -832,9 +832,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.23" +version = "0.4.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" +checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" dependencies = [ "iana-time-zone", "js-sys", @@ -848,9 +848,9 @@ dependencies = [ [[package]] name = "cipher" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1873270f8f7942c191139cb8a40fd228da6c3fd2fc376d7e92d47aa14aeb59e" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ "crypto-common", "inout", @@ -1390,9 +1390,9 @@ checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" [[package]] name = "futures" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e2792b0ff0340399d58445b88fd9770e3489eff258a4cbc1523418f12abf84" +checksum = "531ac96c6ff5fd7c62263c5e3c67a603af4fcaee2e1a0ae5565ba3a11e69e549" dependencies = [ "futures-channel", "futures-core", @@ -1405,9 +1405,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5" +checksum = "164713a5a0dcc3e7b4b1ed7d3b433cabc18025386f9339346e8daf15963cf7ac" dependencies = [ "futures-core", "futures-sink", @@ -1415,15 +1415,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608" +checksum = "86d7a0c1aa76363dac491de0ee99faf6941128376f1cf96f07db7603b7de69dd" [[package]] name = "futures-executor" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8de0a35a6ab97ec8869e32a2473f4b1324459e14c29275d14b10cb1fd19b50e" +checksum = "1997dd9df74cdac935c76252744c1ed5794fac083242ea4fe77ef3ed60ba0f83" dependencies = [ "futures-core", "futures-task", @@ -1443,9 +1443,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531" +checksum = "89d422fa3cbe3b40dca574ab087abb5bc98258ea57eea3fd6f1fa7162c778b91" [[package]] name = "futures-lite" @@ -1464,9 +1464,9 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70" +checksum = "3eb14ed937631bd8b8b8977f2c198443447a8355b6e3ca599f38c975e5a963b6" dependencies = [ "proc-macro2", "quote", @@ -1475,21 +1475,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364" +checksum = "ec93083a4aecafb2a80a885c9de1f0ccae9dbd32c2bb54b0c3a65690e0b8d2f2" [[package]] name = "futures-task" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366" +checksum = "fd65540d33b37b16542a0438c12e6aeead10d4ac5d05bd3f805b8f35ab592879" [[package]] name = "futures-util" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1" +checksum = "3ef6b17e481503ec85211fed8f39d1970f128935ca1f814cd32ac4a6842e84ab" dependencies = [ "futures-channel", "futures-core", @@ -1567,6 +1567,15 @@ dependencies = [ "ahash 0.7.6", ] +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.3", +] + [[package]] name = "hashlink" version = "0.7.0" @@ -1719,9 +1728,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.24" +version = "0.14.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e011372fa0b68db8350aa7a248930ecc7839bf46d8485577d69f117a75f164c" +checksum = "cc5e554ff619822309ffd57d8734d77cd5ce6238bc956f037ea06c58238c9899" dependencies = [ "bytes", "futures-channel", @@ -1926,9 +1935,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.139" +version = "0.2.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" [[package]] name = "libm" @@ -2512,16 +2521,18 @@ checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" [[package]] name = "polling" -version = "2.5.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22122d5ec4f9fe1b3916419b76be1e80bcb93f618d071d2edf841b137b2a2bd6" +checksum = "7e1f879b2998099c2d69ab9605d145d5b661195627eccc680002c4918a7fb6fa" dependencies = [ "autocfg", + "bitflags", "cfg-if", + "concurrent-queue", "libc", "log", - "wepoll-ffi", - "windows-sys 0.42.0", + "pin-project-lite", + "windows-sys 0.45.0", ] [[package]] @@ -2571,9 +2582,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.51" +version = "1.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" +checksum = "1d0e1ae9e836cc3beddd63db0df682593d7e2d3d891ae8c9083d2113e1744224" dependencies = [ "unicode-ident", ] @@ -2621,9 +2632,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.23" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5308e8208729c3e1504a6cfad0d5daacc4614c9a2e65d1ea312a34b5cb00fe84" dependencies = [ "proc-macro2", ] @@ -3039,9 +3050,9 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.28.1" +version = "1.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13cf35f7140155d02ba4ec3294373d513a3c7baa8364c162b030e33c61520a8" +checksum = "2b1b21b8760b0ef8ae5b43d40913ff711a2053cb7ff892a34facff7a6365375a" dependencies = [ "arrayvec", "borsh", @@ -3076,7 +3087,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.16", + "semver 1.0.17", ] [[package]] @@ -3314,9 +3325,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" +checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" [[package]] name = "semver-parser" @@ -3432,9 +3443,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.152" +version = "1.0.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +checksum = "71f2b4817415c6d4210bfe1c7bfcf4801b2d904cb4d0e1a8fdb651013c9e86b8" dependencies = [ "serde_derive", ] @@ -3462,9 +3473,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.152" +version = "1.0.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +checksum = "d071a94a3fac4aff69d023a7f411e33f40f3483f8c5190b1953822b6b76d7630" dependencies = [ "proc-macro2", "quote", @@ -4137,9 +4148,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" +checksum = "524b68aca1d05e03fdf03fcdce2c6c94b6daf6d16861ddaa7e4f2b6638a9052c" [[package]] name = "unicode-ident" @@ -4377,20 +4388,11 @@ dependencies = [ "webpki 0.21.4", ] -[[package]] -name = "wepoll-ffi" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" -dependencies = [ - "cc", -] - [[package]] name = "whoami" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45dbc71f0cdca27dc261a9bd37ddec174e4a0af2b900b890f378460f745426e3" +checksum = "2c70234412ca409cc04e864e89523cb0fc37f5e1344ebed5a3ebf4192b6b9f68" dependencies = [ "wasm-bindgen", "web-sys", diff --git a/docs/index.md b/docs/index.md index 4c2c2fa..f79c7c1 100644 --- a/docs/index.md +++ b/docs/index.md @@ -13,9 +13,9 @@ description: Rustus docs -Rustus is a [TUS](https://tus.io) protocol implementation that helps you handle file uploads. +Rustus is a production-ready [TUS](https://tus.io) protocol implementation that helps you handle file uploads. -This project has many features that make it easy to integrate with your application. +This project has many features that make it easy to integrate with your existing infrastructure. ## Installation From 41eae0ea5a16d6ec0e45b34cf23871f65783071f Mon Sep 17 00:00:00 2001 From: Pavel Kirilin Date: Mon, 13 Mar 2023 04:06:40 +0400 Subject: [PATCH 6/7] Updated docs. Signed-off-by: Pavel Kirilin --- README.md | 10 +++++----- docs/index.md | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 9de42d5..cef8216 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@
- logo + logo

- Docker Image Size (latest by date) - Docker Image Version (latest semver) - GitHub + Docker Image Size (latest by date) + Docker Image Version (latest semver) + GitHub
-

TUS protocol implementation written in Rust.

+

Production-ready TUS protocol implementation written in Rust.

## Features diff --git a/docs/index.md b/docs/index.md index f79c7c1..f35df2a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -7,9 +7,9 @@ description: Rustus docs logo

- Docker Image Size (latest by date) - Docker Image Version (latest semver) - GitHub + Docker Image Size (latest by date) + Docker Image Version (latest semver) + GitHub
From e23b139e53743e6c9eac1e7c0983fde2cf87f31f Mon Sep 17 00:00:00 2001 From: Pavel Kirilin Date: Mon, 13 Mar 2023 13:43:48 +0400 Subject: [PATCH 7/7] Version bumped to 0.7.0. Signed-off-by: Pavel Kirilin --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 678062f..2e81a78 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3164,7 +3164,7 @@ dependencies = [ [[package]] name = "rustus" -version = "0.6.1" +version = "0.7.0" dependencies = [ "actix-cors", "actix-files", diff --git a/Cargo.toml b/Cargo.toml index 12fbb70..7f355e9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rustus" -version = "0.6.1" +version = "0.7.0" edition = "2021" description = "TUS protocol implementation written in Rust." keywords = ["tus", "server", "actix-web"]