diff --git a/Cargo.lock b/Cargo.lock index 7d7ed675..16e127f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,18 +4,18 @@ version = 3 [[package]] name = "addr2line" -version = "0.14.1" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a55f82cfe485775d02112886f4169bde0c5894d75e79ead7eafe7e40a25e45f7" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] [[package]] name = "adler" -version = "0.2.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aa100a6f6f525226719f8de3f70076be4f4191801ebd92621450d1c51e9053d" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "android-tzdata" @@ -34,63 +34,64 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.0" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff2cf94a3dbe2d57cbd56485e1bd7436455058034d6c2d47be51d4e5e4bc6ab" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.0" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" [[package]] name = "anstyle-parse" -version = "0.2.0" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" dependencies = [ - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.0" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0238ca56c96dfa37bdf7c373c8886dd591322500aceeeccdb2216fe06dc2f796" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" dependencies = [ "anstyle", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "asn1-rs" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e577111f9ca51289da894bcb4b17047737218c2e4477ea2fc36cd3922172062f" +checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" dependencies = [ "asn1-rs-derive", "asn1-rs-impl", "displaydoc", "nom", - "num-traits 0.2.14", + "num-traits", "rusticata-macros", "thiserror", "time", @@ -98,13 +99,13 @@ dependencies = [ [[package]] name = "asn1-rs-derive" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b9002415e8baa0177a3ae0946fb62ca6e9e470755717409134e44d8e0ae2cad" +checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" dependencies = [ "proc-macro2", "quote", - "syn 1.0.91", + "syn 1.0.109", "synstructure", ] @@ -116,52 +117,53 @@ checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" dependencies = [ "proc-macro2", "quote", - "syn 1.0.91", + "syn 1.0.109", ] [[package]] name = "async-stream" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dad5c83079eae9969be7fadefe640a1c566901f05ff91ab221de4b6f68d9507e" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" dependencies = [ "async-stream-impl", "futures-core", + "pin-project-lite", ] [[package]] name = "async-stream-impl" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 1.0.91", + "syn 2.0.71", ] [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.71", ] [[package]] name = "autocfg" -version = "1.0.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.58" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88fb5a785d6b44fd9d6700935608639af1b8356de1e55d5f7c2740f4faa15d82" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", @@ -174,42 +176,36 @@ dependencies = [ [[package]] name = "bitflags" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5cde24d1b2e2216a726368b2363a273739c91f4e3eb4e0dd12d672d396ad989" - -[[package]] -name = "bitflags" -version = "2.2.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24a6904aef64d73cf10ab17ebace7befb918b82164785cb89907993be7f83813" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "block-buffer" -version = "0.10.1" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03588e54c62ae6d763e2a80090d50353b785795361b4ff5b3bf0a5097fc31c0b" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array", ] [[package]] name = "bumpalo" -version = "3.2.1" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ae9db68ad7fac5fe51304d20f016c911539251075a214f8e663babefa35187" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytes" -version = "1.0.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1f8e949d755f9d79112b5bb46938e0ef9d3804a0b16dfab13aafcaa5f0fa72" +checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" [[package]] name = "cc" -version = "1.0.69" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2" +checksum = "324c74f2155653c90b04f25b2a47a8a631360cb908f92a772695f430c7e31052" [[package]] name = "cfg-if" @@ -219,149 +215,90 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.32" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41daef31d7a747c5c847246f36de49ced6f7403b4cdabc807a97b5cc184cda7a" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", - "num-traits 0.2.14", + "num-traits", "serde", - "windows-targets 0.52.0", + "windows-targets 0.52.6", ] [[package]] name = "clap" -version = "4.4.10" +version = "4.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fffed7514f420abec6d183b1d3acfd9099c79c3a10a06ade4f8203f1411272" +checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.4.9" +version = "4.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63361bae7eef3771745f02d8d892bec2fee5f6e34af316ba556e7f97a7069ff1" +checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim", + "strsim 0.11.1", ] [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" - -[[package]] -name = "codespan-reporting" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6ce42b8998a383572e0a802d859b1f00c79b7b7474e62fff88ee5c2845d9c13" -dependencies = [ - "termcolor", - "unicode-width", -] +checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" [[package]] name = "core-foundation" -version = "0.7.0" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ - "core-foundation-sys 0.7.0", + "core-foundation-sys", "libc", ] [[package]] name = "core-foundation-sys" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" - -[[package]] -name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] [[package]] name = "crypto-common" -version = "0.1.2" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4600d695eb3f6ce1cd44e6e291adceb2cc3ab12f20a33777ecd0bf6eba34e06" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", -] - -[[package]] -name = "cxx" -version = "1.0.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c53d75fe543215ca091d792e13351dcb940842dd2829b2a2dd43ab4bd1a015" -dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", -] - -[[package]] -name = "cxx-build" -version = "1.0.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbb7ed9eb5b6ed9942747aea961a4303b7a56c54f582ea8304cdae391d29d274" -dependencies = [ - "cc", - "codespan-reporting", - "lazy_static", - "proc-macro2", - "quote", - "scratch", - "syn 1.0.91", -] - -[[package]] -name = "cxxbridge-flags" -version = "1.0.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca21461be76a23df4f63a2107a0bb406ef41548e635ff7edcbd1ab5a6bb997e2" - -[[package]] -name = "cxxbridge-macro" -version = "1.0.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8da0a2c0697647b5824844a5d2dedcd97a2d7b75e6e4d0b8dd183e4081e1cf" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.91", + "typenum", ] [[package]] name = "darling" -version = "0.14.0" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a5d2e8b5a94b2261efb20e99a01255b9c5293797d69bbf04600567b2f9b8d7" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" dependencies = [ "darling_core", "darling_macro", @@ -369,49 +306,58 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.14.0" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1c7d56716be82d9c6adb967cfe700955179ea88806e898483dad6987330a54" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim", - "syn 1.0.91", + "strsim 0.10.0", + "syn 1.0.109", ] [[package]] name = "darling_macro" -version = "0.14.0" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64dd7e5a75a00cb6799ae9fbbfc3bba0134def6579a9e27564e72c839c837bed" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" dependencies = [ "darling_core", "quote", - "syn 1.0.91", + "syn 1.0.109", ] [[package]] name = "data-encoding" -version = "2.2.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72aa14c04dfae8dd7d8a2b1cb7ca2152618cd01336dbfe704b8dcbf8d41dbd69" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" [[package]] name = "der-parser" -version = "8.1.0" +version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42d4bc9b0db0a0df9ae64634ac5bdefb7afcb534e182275ca0beadbe486701c1" +checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" dependencies = [ "asn1-rs", "displaydoc", "nom", "num-bigint", - "num-traits 0.2.14", + "num-traits", "rusticata-macros", ] +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] + [[package]] name = "derive_builder" version = "0.12.0" @@ -430,7 +376,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 1.0.91", + "syn 1.0.109", ] [[package]] @@ -440,14 +386,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" dependencies = [ "derive_builder_core", - "syn 1.0.91", + "syn 1.0.109", ] [[package]] name = "digest" -version = "0.10.2" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cb780dce4f9a8f5c087362b3a4595936b2019e7c8b30f2c3e9a7e94e6ae9837" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", "crypto-common", @@ -455,20 +401,24 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.2" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "278ef1934318d524612205f69df005eea30ec10edf7913e500b5a527fce55bc0" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 1.0.91", + "syn 2.0.71", ] [[package]] -name = "dtoa" -version = "0.4.0" +name = "errno" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5edd69c67b2f8e0911629b7e6b8a34cb3956613cd7c6e6414966dee349c2db4f" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] [[package]] name = "faktory" @@ -485,7 +435,7 @@ dependencies = [ "oid-registry", "openssl", "pin-project", - "rand 0.8.0", + "rand", "rustls-pki-types", "semver", "serde", @@ -497,12 +447,19 @@ dependencies = [ "tokio-native-tls", "tokio-rustls", "tokio-test", + "tokio-util", "tracing", "tracing-subscriber", "url", "x509-parser", ] +[[package]] +name = "fastrand" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" + [[package]] name = "fnv" version = "1.0.7" @@ -511,46 +468,45 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foreign-types" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21b40436003b2a1e22483c5ed6c3d25e755b6b3120f601cc22aa57e25dc9065" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ "foreign-types-shared", ] [[package]] name = "foreign-types-shared" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baa1839fc3c5487b5e129ea4f774e3fd84e6c4607127315521bc014a722ebc9e" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] -name = "fuchsia-zircon" -version = "0.3.1" +name = "form_urlencoded" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b5365afd01fdf916e775a224e844f80b3b9710d0f4f00903e219e859474d7ae" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ - "bitflags 1.0.0", - "fuchsia-zircon-sys", + "percent-encoding", ] [[package]] -name = "fuchsia-zircon-sys" -version = "0.3.1" +name = "futures-core" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069def9a0e5feb7e9120635f6ebad24d853a6affbb077fec84d0888316cf9ae6" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] -name = "futures-core" -version = "0.3.0" +name = "futures-sink" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30f0ab78f035d7ed5d52689f4b05a56c15ad80097f1d860e644bdc9dba3831f2" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "generic-array" -version = "0.14.4" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -558,9 +514,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -569,15 +525,21 @@ dependencies = [ [[package]] name = "gimli" -version = "0.23.0" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" + +[[package]] +name = "hermit-abi" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hostname" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01b1af8d6d068ba9de1c39c6ff0d879aed20f74873d4d3929a4535000bb07886" +checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" dependencies = [ "libc", "match_cfg", @@ -586,26 +548,25 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.54" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c17cc76786e99f8d2f055c11159e7f0091c42474dcc3189fbab96072e873e6d" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", - "core-foundation-sys 0.8.3", + "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows", + "windows-core", ] [[package]] name = "iana-time-zone-haiku" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ - "cxx", - "cxx-build", + "cc", ] [[package]] @@ -616,62 +577,58 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.2.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ - "matches", "unicode-bidi", "unicode-normalization", ] [[package]] -name = "itoa" -version = "0.3.0" +name = "is_terminal_polyfill" +version = "1.70.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fd9dc2c587067de817fec4ad355e3818c3d893a78cab32a0a474c7a15bb8d5" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" [[package]] name = "itoa" -version = "1.0.1" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.50" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d99f9e3e84b8f67f846ef5b4cbbc3b1c29f6c759fcbce6f01aa0e73d932a24c" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.149" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] -name = "link-cplusplus" -version = "1.0.0" +name = "linux-raw-sys" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dfb9f65d9966f6ca6522043978030b564f3291af987fbf1dd55b6a064ba1b36" -dependencies = [ - "cc", -] +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "match_cfg" @@ -679,54 +636,44 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" -[[package]] -name = "matches" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15305656809ce5a4805b1ff2946892810992197ce1270ff79baded852187942e" - [[package]] name = "memchr" -version = "2.0.0" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e01e64d9017d18e7fc09d8e4fe0e28ff6931019e979fb8019319db7ca827f8a6" -dependencies = [ - "libc", -] +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "minimal-lexical" -version = "0.1.2" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6595bb28ed34f43c3fe088e48f6cfb2e033cab45f25a5384d5fdf564fbc8c4b2" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.4.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0f75932c1f6cfae3c04000e40114adf955636e19040f9c0a2c380702aa1c7f" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.9" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "wasi", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] name = "native-tls" -version = "0.2.4" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b0d88c06fe90d5ee94048ba40409ef1d9315d86f6f38c2efdaad4fb50c58b2d" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" dependencies = [ - "lazy_static", "libc", "log", "openssl", @@ -740,13 +687,12 @@ dependencies = [ [[package]] name = "nom" -version = "7.0.0" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffd9d26838a953b4af82cbeb9f1592c6798916983959be223a7124e992742c1" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ "memchr", "minimal-lexical", - "version_check", ] [[package]] @@ -761,64 +707,57 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.2" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74e768dff5fb39a41b3bcd30bb25cf989706c90d028d1ad71971987aa309d535" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", - "num-traits 0.2.14", + "num-traits", ] [[package]] -name = "num-integer" -version = "0.1.42" +name = "num-conv" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" -dependencies = [ - "autocfg", - "num-traits 0.2.14", -] +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[package]] -name = "num-traits" -version = "0.1.32" +name = "num-integer" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51eab148f171aefad295f8cece636fc488b9b392ef544da31ea4b8ef6b9e9c39" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] [[package]] name = "num_cpus" -version = "1.8.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ + "hermit-abi", "libc", ] [[package]] -name = "num_threads" -version = "0.1.2" +name = "object" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71a1eb3a36534514077c1e079ada2fb170ef30c47d203aa6916138cf882ecd52" +checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" dependencies = [ - "libc", + "memchr", ] -[[package]] -name = "object" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a7ab5d64814df0fe4a4b5ead45ed6c5f181ee3ff04ba344313a6c80446c5d4" - [[package]] name = "oid-registry" version = "0.6.1" @@ -836,11 +775,11 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "openssl" -version = "0.10.60" +version = "0.10.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79a4c6c3a2b158f7f8f2a2fc5a969fa3a068df6fc9dbb4a43845436e3af7c800" +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ - "bitflags 2.2.1", + "bitflags", "cfg-if", "foreign-types", "libc", @@ -851,26 +790,26 @@ dependencies = [ [[package]] name = "openssl-macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 1.0.91", + "syn 2.0.71", ] [[package]] name = "openssl-probe" -version = "0.1.0" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "756d49c8424483a3df3b5d735112b4da22109ced9a8294f1f5cdf80fb3810919" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.96" +version = "0.9.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3812c071ba60da8b5677cc12bcb1d42989a65553772897a7e0355545a819838f" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" dependencies = [ "cc", "libc", @@ -886,93 +825,88 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "percent-encoding" -version = "2.0.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f28a6faf4ffea762ba8f4baef48c61a6db348647c73095034041fc79dd954" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.71", ] [[package]] name = "pin-project-lite" -version = "0.2.11" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c516611246607d0c04186886dbb3a754368ef82c79e9827a802c6d836dd111c" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pkg-config" -version = "0.3.9" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + +[[package]] +name = "powerfmt" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.8" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "237a5ed80e274dbc66f86bd59c1e25edc039660be53194b5fe0a482e0f2612ea" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro2" -version = "1.0.74" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2de98502f212cfcea8d0bb305bd0f49d7ebdd75b64ba0a68f937d888f4e0d6db" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] [[package]] name = "rand" -version = "0.4.1" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5f78082e6a6d042862611e9640cf20776185fee506cf6cf67e93c6225cee31" -dependencies = [ - "fuchsia-zircon", - "libc", -] - -[[package]] -name = "rand" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76330fb486679b4ace3670f117bbc9e16204005c4bde9c4bd372f45bed34f12" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha", "rand_core", - "rand_hc", ] [[package]] name = "rand_chacha" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", "rand_core", @@ -980,71 +914,61 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.2" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ "getrandom", ] -[[package]] -name = "rand_hc" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" -dependencies = [ - "rand_core", -] - -[[package]] -name = "redox_syscall" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35a48131ab10dbeb17202bd1dcb9c9798963a58a50c9ec31640f237358832094" - -[[package]] -name = "remove_dir_all" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" -dependencies = [ - "winapi", -] - [[package]] name = "ring" -version = "0.17.0" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb9d44f9bf6b635117787f72416783eb7e4227aaf255e5ce739563d817176a7e" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", + "cfg-if", "getrandom", "libc", "spin", "untrusted", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "rustc-demangle" -version = "0.1.4" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3058a43ada2c2d0b92b3ae38007a2d0fa5e9db971be260e0171408a4ff471c95" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rusticata-macros" -version = "4.0.0" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65c52377bb2288aa522a0c8208947fada1e0c76397f108cc08f57efe6077b50d" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" dependencies = [ "nom", ] +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + [[package]] name = "rustls" -version = "0.22.0" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bc238b76c51bbc449c55ffbc39d03772a057cc8cf783c49d4af4c2537b74a8b" +checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" dependencies = [ "log", "ring", @@ -1056,15 +980,15 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.0.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7673e0aa20ee4937c6aacfc12bb8341cfbf054cdd21df6bec5fd0629fe9339b" +checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" [[package]] name = "rustls-webpki" -version = "0.102.0" +version = "0.102.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de2635c8bc2b88d367767c5de8ea1d8db9af3f6219eba28442242d9ab81d1b89" +checksum = "f9a6fccd794a42c2c105b513a2f62bc3fd8f3ba57a4593677ceb0bd035164d78" dependencies = [ "ring", "rustls-pki-types", @@ -1072,40 +996,40 @@ dependencies = [ ] [[package]] -name = "schannel" -version = "0.1.16" +name = "ryu" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f550b06b6cba9c8b8be3ee73f391990116bf527450d2556e9b9ce263b9a021" -dependencies = [ - "lazy_static", - "winapi", -] +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] -name = "scratch" -version = "1.0.0" +name = "schannel" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e114536316b51a5aa7a0e59fc49661fd263c5507dd08bd28de052e57626ce69" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +dependencies = [ + "windows-sys 0.52.0", +] [[package]] name = "security-framework" -version = "0.4.1" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97bbedbe81904398b6ebb054b3e912f99d55807125790f3198ac990d98def5b0" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 1.0.0", + "bitflags", "core-foundation", - "core-foundation-sys 0.7.0", + "core-foundation-sys", + "libc", "security-framework-sys", ] [[package]] name = "security-framework-sys" -version = "0.4.1" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06fd2f23e31ef68dd2328cc383bd493142e46107a3a0e24f7d734e3f3b80fe4c" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ - "core-foundation-sys 0.7.0", + "core-foundation-sys", "libc", ] @@ -1120,41 +1044,40 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.202" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.202" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.71", ] [[package]] name = "serde_json" -version = "1.0.0" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9b1ec939469a124b27e208106550c38358ed4334d2b1b5b3825bc1ee37d946a" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ - "dtoa", - "itoa 0.3.0", - "num-traits 0.1.32", + "itoa", + "ryu", "serde", ] [[package]] name = "sha2" -version = "0.10.1" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99c3bd8169c58782adad9290a9af5939994036b76187f7b4f0e6de91dbbfc0ec" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -1178,19 +1101,19 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" -version = "0.5.5" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "spin" -version = "0.9.2" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "511254be0c5bcf062b019a6c89c01a664aa359ded62f78aa72c6fc137c0590e5" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "strsim" @@ -1198,28 +1121,34 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "1.0.91" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b683b2b825c8eef438b77c36a06dc262294da3d5a5813fac20da149241dcd44d" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", "quote", - "unicode-xid 0.2.0", + "unicode-ident", ] [[package]] name = "syn" -version = "2.0.46" +version = "2.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89456b690ff72fddcecf231caedbe615c59480c93358a93dfae7fc29e3ebbf0e" +checksum = "b146dcf730474b4bcd16c311627b31ede9ab149045db4d6088b3becaea046462" dependencies = [ "proc-macro2", "quote", @@ -1228,56 +1157,46 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.12.0" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "affc27d5f1764f7487bafeb41e380664790716e38ba45d8487bddcc53e79f0f6" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2", "quote", - "syn 1.0.91", - "unicode-xid 0.1.0", + "syn 1.0.109", + "unicode-xid", ] [[package]] name = "tempfile" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47776f63b85777d984a50ce49d6b9e58826b6a3766a449fc95bc66cd5663c15b" -dependencies = [ - "libc", - "rand 0.4.1", - "redox_syscall", - "remove_dir_all", - "winapi", -] - -[[package]] -name = "termcolor" -version = "1.0.0" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a52c023823933499250b43960b272e25336c6e2ab8684672edc34489f049ccdd" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ - "wincolor", + "cfg-if", + "fastrand", + "rustix", + "windows-sys 0.52.0", ] [[package]] name = "thiserror" -version = "1.0.30" +version = "1.0.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" +checksum = "f2675633b1499176c2dff06b0856a27976a8f9d436737b4cf4f312d4d91d8bbb" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.30" +version = "1.0.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" +checksum = "d20468752b09f49e909e55a5d338caa8bedf615594e9d80bc4c565d30faf798c" dependencies = [ "proc-macro2", "quote", - "syn 1.0.91", + "syn 2.0.71", ] [[package]] @@ -1292,27 +1211,55 @@ dependencies = [ [[package]] name = "time" -version = "0.3.7" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "004cbc98f30fa233c61a38bc77e96a9106e65c88f2d3bef182ae952027e5753d" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ - "itoa 1.0.1", - "libc", - "num_threads", + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", "time-macros", ] +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + [[package]] name = "time-macros" -version = "0.2.3" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinyvec" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25eb0ca3468fc0acc11828786797f6ef9aa1555e4a211a60d64cc8e4d1be47d6" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.35.1" +version = "1.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" +checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" dependencies = [ "backtrace", "bytes", @@ -1322,18 +1269,18 @@ dependencies = [ "pin-project-lite", "socket2", "tokio-macros", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.71", ] [[package]] @@ -1359,9 +1306,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.1" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4cdeb73537e63f98adcd73138af75e3f368ccaecffaa29d7eb61b9f5a440457" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" dependencies = [ "futures-core", "pin-project-lite", @@ -1370,9 +1317,9 @@ dependencies = [ [[package]] name = "tokio-test" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89b3cbabd3ae862100094ae433e1def582cf86451b4e9bf83aa7ac1d8a7d719" +checksum = "2468baabc3311435b55dd935f702f42cd1b8abb7e754fb7dfb16bd36aa88f9f7" dependencies = [ "async-stream", "bytes", @@ -1381,13 +1328,25 @@ dependencies = [ "tokio-stream", ] +[[package]] +name = "tokio-util" +version = "0.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + [[package]] name = "tracing" -version = "0.1.34" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -1401,7 +1360,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.46", + "syn 2.0.71", ] [[package]] @@ -1441,48 +1400,36 @@ dependencies = [ [[package]] name = "typenum" -version = "1.12.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-bidi" -version = "0.3.0" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2560b941fdb9ea38301b9b708504d612fcdf9c91a8c31d82219bd74cb07d304d" -dependencies = [ - "matches", -] +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.0" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.5" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ccda9ef9efa3f7ef5d91e8f9b83bbe6955f9bf86aec89d5cce2c874625920f" - -[[package]] -name = "unicode-width" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc85732b6d55a0d520aaf765536a188d9d993770c28633422f85bb646da61335" - -[[package]] -name = "unicode-xid" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +dependencies = [ + "tinyvec", +] [[package]] name = "unicode-xid" -version = "0.2.0" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "untrusted" @@ -1492,20 +1439,20 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.0.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ddaf52e65c6b81c56b7e957c0b1970f7937f21c5c6774c4e56fcb4e20b48c6" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ + "form_urlencoded", "idna", - "matches", "percent-encoding", ] [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "valuable" @@ -1515,15 +1462,15 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "vcpkg" -version = "0.2.8" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.0" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45d3d553fd9413fffe7147a20171d640eda0ad4c070acd7d0c885a21bcd2e8b7" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "wasi" @@ -1533,9 +1480,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.73" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83240549659d187488f91f33c0f8547cbfef0b2088bc470c116d1d260ef623d9" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -1543,24 +1490,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.73" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae70622411ca953215ca6d06d3ebeb1e915f0f6613e3b495122878d7ebec7dae" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", - "syn 1.0.91", + "syn 2.0.71", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.73" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e734d91443f177bfdb41969de821e15c516931c3c3db3d318fa1b68975d0f6f" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1568,22 +1515,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.73" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53739ff08c8a68b0fdbcd54c372b8ab800b1449ab3c9d706503bc7dd1621b2c" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 1.0.91", + "syn 2.0.71", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.73" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9a543ae66aa233d14bb765ed9af4a33e81b8b58d1584cf1b47ff8cd0b9e4489" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "winapi" @@ -1608,21 +1555,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "wincolor" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9dc3aa9dcda98b5a16150c54619c1ead22e3d3a5d458778ae914be760aa981a" -dependencies = [ - "winapi", -] - -[[package]] -name = "windows" -version = "0.46.0" +name = "windows-core" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdacb41e6a96a052c6cb63a144f24900236121c6f63f4f8219fef5977ecb0c25" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.42.2", + "windows-targets 0.52.6", ] [[package]] @@ -1631,179 +1569,138 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] [[package]] -name = "windows-targets" -version = "0.42.2" +name = "windows-sys" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-targets 0.52.6", ] [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.42.2" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.42.2" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] -name = "windows_i686_gnu" -version = "0.52.0" +name = "windows_i686_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.2" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.42.2" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "x509-parser" @@ -1824,6 +1721,6 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.6.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" diff --git a/Cargo.toml b/Cargo.toml index 11d28a1e..cd9a88c7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,11 +38,12 @@ serde_json = "1.0" sha2 = "0.10.0" thiserror = "1.0.30" tokio = { version = "1.35.1", features = [ - "io-util", - "net", - "rt", - "rt-multi-thread", - "time", + "sync", # gives us an asynchronous `Mutex` + "io-util", # enables `AsyncWriteExt`, `AsyncReadExt`, and `AsyncBufReadExt` in `tokio::io` namespace + "macros", # brings in `tokio::select!` we are utilizing in `Worker::run` + "net", # enables `tokio::net` namespace with `TcpStream` we are heavily relying upon + "rt-multi-thread", # allows for `tokio::task::block_in_place()` in Client::drop + "time", # anables `tokio::time` namespace holding the `sleep` utility and `Duraction` struct ] } tokio-native-tls = { version = "0.3.1", optional = true } tokio-rustls = { version = "0.25.0", optional = true } @@ -54,6 +55,7 @@ semver = { version = "1.0.23", features = ["serde"] } rustls-pki-types = "1.0.1" tokio = { version = "1.35.1", features = ["rt", "macros"] } tokio-test = "0.4.3" +tokio-util = "0.7.11" tracing-subscriber = "0.3.18" x509-parser = "0.15.1" diff --git a/src/lib.rs b/src/lib.rs index f8f97828..badd21af 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -75,10 +75,12 @@ mod proto; mod worker; pub use crate::error::Error; + pub use crate::proto::{ Client, DataSnapshot, FaktoryState, Job, JobBuilder, JobId, Reconnect, ServerSnapshot, WorkerId, }; -pub use crate::worker::{JobRunner, Worker, WorkerBuilder}; + +pub use crate::worker::{JobRunner, StopDetails, StopReason, Worker, WorkerBuilder}; #[cfg(feature = "ent")] #[cfg_attr(docsrs, doc(cfg(feature = "ent")))] diff --git a/src/worker/builder.rs b/src/worker/builder.rs index 3c5d9aee..ea445306 100644 --- a/src/worker/builder.rs +++ b/src/worker/builder.rs @@ -1,10 +1,11 @@ -use super::{runner::Closure, CallbacksRegistry, Client, Worker}; +use super::{runner::Closure, CallbacksRegistry, Client, ShutdownSignal, Worker}; use crate::{ proto::{utils, ClientOptions}, Error, Job, JobRunner, WorkerId, }; use std::future::Future; use std::sync::Arc; +use std::time::Duration; use tokio::io::{AsyncRead, AsyncWrite, BufStream}; use tokio::net::TcpStream as TokioStream; @@ -15,6 +16,8 @@ pub struct WorkerBuilder { opts: ClientOptions, workers_count: usize, callbacks: CallbacksRegistry, + shutdown_timeout: Option, + shutdown_signal: Option, } impl Default for WorkerBuilder { @@ -33,6 +36,8 @@ impl Default for WorkerBuilder { opts: ClientOptions::default(), workers_count: 1, callbacks: CallbacksRegistry::default(), + shutdown_timeout: None, + shutdown_signal: None, } } } @@ -91,6 +96,81 @@ impl WorkerBuilder { self } + /// Set a graceful shutdown signal. + /// + /// As soon as the provided future resolves, the graceful shutdown will step in + /// making the long-running operation (see [`Worker::run`]) return control to the calling code. + /// + /// The graceful shutdown itself is a race between the clean up needed to be performed + /// (e.g. report on the currently processed to the Faktory server) and a shutdown deadline. + /// The latter can be customized via [`WorkerBuilder::shutdown_timeout`]. + /// + /// Note that once the `signal` resolves, the [`Worker`] will be marked as terminated and calling + /// [`Worker::run`] will cause a panic. You will need to build and run a new worker instead. + /// + /// ```no_run + /// # tokio_test::block_on(async { + /// use faktory::{Client, Job, StopReason, Worker}; + /// use std::time::Duration; + /// use tokio_util::sync::CancellationToken; + /// use tokio::time::sleep; + /// + /// Client::connect(None) + /// .await + /// .unwrap() + /// .enqueue(Job::new("foobar", vec!["z"])) + /// .await + /// .unwrap(); + /// + /// // create a signalling future (we are using a utility from the `tokio_util` crate) + /// let token = CancellationToken::new(); + /// let child_token = token.child_token(); + /// let signal = async move { child_token.cancelled().await }; + /// + /// // get a connected worker + /// let mut w = Worker::builder() + /// .with_graceful_shutdown(signal) + /// .register_fn("job_type", move |_| async { Ok::<(), std::io::Error>(()) }) + /// .connect(None) + /// .await + /// .unwrap(); + /// + /// // start consuming + /// let jh = tokio::spawn(async move { w.run(&["default"]).await }); + /// + /// // verify the consumer thread has not finished + /// sleep(Duration::from_secs(2)).await; + /// assert!(!jh.is_finished()); + /// + /// // send a signal to eventually return control (upon graceful shutdown) + /// token.cancel(); + /// + /// // learn the stop reason and the number of workers that were still running + /// let stop_details = jh.await.expect("joined ok").unwrap(); + /// assert_eq!(stop_details.reason, StopReason::GracefulShutdown); + /// let _nrunning = stop_details.workers_still_running; + /// # }); + /// ``` + pub fn with_graceful_shutdown(mut self, signal: F) -> Self + where + F: Future + 'static + Send, + { + self.shutdown_signal = Some(Box::pin(signal)); + self + } + + /// Set a shutdown timeout. + /// + /// This will be used once the worker is sent a termination signal whether it is at the application + /// (via a signalling future, see [`WorkerBuilder::with_graceful_shutdown`]) or OS level (via Ctrl-C signal, + /// see [`Worker::run_to_completion`]). + /// + /// Defaults to `None`, i.e. no shoutdown abortion due to a timeout. + pub fn shutdown_timeout(mut self, dur: Duration) -> Self { + self.shutdown_timeout = Some(dur); + self + } + /// Register a handler function for the given job type (`kind`). /// /// Whenever a job whose type matches `kind` is fetched from the Faktory, the given handler @@ -161,7 +241,14 @@ impl WorkerBuilder { self.opts.is_worker = true; let buffered = BufStream::new(stream); let client = Client::new(buffered, self.opts).await?; - Ok(Worker::new(client, self.workers_count, self.callbacks).await) + Ok(Worker::new( + client, + self.workers_count, + self.callbacks, + self.shutdown_timeout, + self.shutdown_signal, + ) + .await) } /// Connect to a Faktory server. diff --git a/src/worker/health.rs b/src/worker/health.rs index a40a59a1..bdb446df 100644 --- a/src/worker/health.rs +++ b/src/worker/health.rs @@ -25,6 +25,10 @@ where /// but should _continue_ processing its current job (if any); /// /// See more details [here](https://github.com/contribsys/faktory/blob/b4a93227a3323ab4b1365b0c37c2fac4f9588cc8/server/workers.go#L13-L49). + /// + /// Note that this method is not cancellation safe. We are using an interval timer internally, that + /// would be reset should we call this method anew. Besides, the `Heartbeat` command is being issued + /// with the help of `AsyncWriteExt::write_all` which is not cancellation safe either. pub(crate) async fn listen_for_heartbeats( &mut self, statuses: &[Arc], @@ -51,7 +55,7 @@ where } if last.elapsed() < HEARTBEAT_INTERVAL { - // don't sent a heartbeat yet + // don't send a heartbeat yet continue; } diff --git a/src/worker/mod.rs b/src/worker/mod.rs index 76a7da26..80efe0c4 100644 --- a/src/worker/mod.rs +++ b/src/worker/mod.rs @@ -2,24 +2,33 @@ use super::proto::{Client, Reconnect}; use crate::error::Error; use crate::proto::{Ack, Fail, Job}; use fnv::FnvHashMap; +use std::future::Future; +use std::pin::Pin; +use std::process; use std::sync::{atomic, Arc}; +use std::time::Duration; use std::{error::Error as StdError, sync::atomic::AtomicUsize}; use tokio::io::{AsyncBufRead, AsyncWrite}; use tokio::net::TcpStream; use tokio::task::{spawn_blocking, AbortHandle, JoinError, JoinSet}; +use tokio::time::sleep as tokio_sleep; mod builder; mod health; mod runner; mod state; +mod stop; pub use builder::WorkerBuilder; pub use runner::JobRunner; +pub use stop::{StopDetails, StopReason}; pub(crate) const STATUS_RUNNING: usize = 0; pub(crate) const STATUS_QUIET: usize = 1; pub(crate) const STATUS_TERMINATING: usize = 2; +type ShutdownSignal = Pin + 'static + Send>>; + pub(crate) enum Callback { Async(runner::BoxedJobRunner), Sync(Arc Result<(), E> + Sync + Send + 'static>), @@ -153,6 +162,12 @@ pub struct Worker { worker_states: Arc, callbacks: Arc>, terminated: bool, + forever: bool, + shutdown_timeout: Option, + + // NOTE: this is always `Some` if `self.terminated == false` whenever any `pub` function + // on this type returns. it is `Some(std::future::pending())` if no shutdown signaler is set. + shutdown_signal: Option, } impl Worker { @@ -171,12 +186,23 @@ impl Worker { } impl Worker { - async fn new(c: Client, workers_count: usize, callbacks: CallbacksRegistry) -> Self { + async fn new( + c: Client, + workers_count: usize, + callbacks: CallbacksRegistry, + shutdown_timeout: Option, + shutdown_signal: Option, + ) -> Self { Worker { c, callbacks: Arc::new(callbacks), worker_states: Arc::new(state::WorkerStatesRegistry::new(workers_count)), terminated: false, + forever: false, + shutdown_timeout, + shutdown_signal: Some( + shutdown_signal.unwrap_or_else(|| Box::pin(std::future::pending())), + ), } } } @@ -247,13 +273,13 @@ impl /// /// This will FAIL _all_ the jobs even though they're still running. /// Returns the number of workers that may still be processing jobs. - async fn force_fail_all_workers(&mut self) -> usize { + async fn force_fail_all_workers(&mut self, reason: &str) -> usize { let mut running = 0; for wstate in &*self.worker_states { let may_be_jid = wstate.lock().unwrap().take_currently_running(); if let Some(jid) = may_be_jid { running += 1; - let f = Fail::generic(jid, "terminated"); + let f = Fail::generic(jid, reason); let _ = match self.c.issue(&f).await { Ok(r) => r.read_ok().await, // We are ignoring any FAIL command issue errors, since this is already @@ -267,10 +293,20 @@ impl } /// Fetch and run a single job, and then return. + /// + /// Note that if you called [`Worker::run`] on this worker previously and the run + /// discontinued due to a signal from the Faktory server or a graceful shutdown signal, + /// calling this method will mean you are trying to run a _terminated_ worker which will + /// cause a panic. You will need to build and run a new worker instead. pub async fn run_one(&mut self, worker: usize, queues: &[Q]) -> Result where Q: AsRef + Sync, { + assert!( + !self.terminated, + "do not re-run a terminated worker (coordinator)" + ); + let job = match self.c.fetch(queues).await? { None => return Ok(false), Some(j) => j, @@ -326,6 +362,9 @@ impl< callbacks: Arc::clone(&self.callbacks), worker_states: Arc::clone(&self.worker_states), terminated: self.terminated, + forever: self.forever, + shutdown_timeout: self.shutdown_timeout, + shutdown_signal: Some(Box::pin(std::future::pending())), }) } @@ -353,15 +392,24 @@ impl< })) } - /// Run this worker on the given `queues` until an I/O error occurs (`Err` is returned), or - /// until the server tells the worker to disengage (`Ok` is returned). + /// Run this worker on the given `queues`. + /// + /// Will run the worker until an I/O error occurs (`Err` is returned), or until the server tells the worker + /// to disengage (`Ok` is returned), or a signal from the user-space code has been received via a future + /// supplied to [`WorkerBuilder::with_graceful_shutdown`](`Ok` is returned). /// - /// The value in an `Ok` indicates the number of workers that may still be processing jobs. + /// The value in an `Ok` holds [`details`](StopDetails) about the reason why the run has discontinued (see [`StopReason`]) + /// and the number of workers that may still be processing jobs. Note that `0` in [`StopDetails::workers_still_running`] + /// can also indicate that the [graceful shutdown period](WorkerBuilder::shutdown_timeout) has been exceeded. /// /// If an error occurred while reporting a job success or failure, the result will be re-reported to the server /// without re-executing the job. If the worker was terminated (i.e., `run` returns with an `Ok` response), /// the worker should **not** try to resume by calling `run` again. This will cause a panic. - pub async fn run(&mut self, queues: &[Q]) -> Result + /// + /// Note that if you provided a shutdown signal when building this worker (see [`WorkerBuilder::with_graceful_shutdown`]), + /// and this signal resolved, the worker will be marked as terminated and calling this method will cause a panic. + /// You will need to build and run a new worker instead. + pub async fn run(&mut self, queues: &[Q]) -> Result where Q: AsRef, { @@ -371,10 +419,10 @@ impl< ); self.report_on_all_workers().await?; - let workers_count = self.worker_states.len(); + let nworkers = self.worker_states.len(); // keep track of the current status of each worker - let statuses: Vec<_> = (0..workers_count) + let statuses: Vec<_> = (0..nworkers) .map(|_| Arc::new(atomic::AtomicUsize::new(STATUS_RUNNING))) .collect(); @@ -385,45 +433,84 @@ impl< .await?; } - let exit = self.listen_for_heartbeats(&statuses).await; - - // there are a couple of cases here: - // - // - we got TERMINATE, so we should just return, even if a worker is still running - // - we got TERMINATE and all workers have exited - // - we got an error from heartbeat() - // - self.terminated = exit.is_ok(); + // the only place `shutdown_signal` is set to `None` is when we `.take()` it here. + // later on, we maintain the invariant that either `self.terminated` is set to `true` OR we + // restore `shutdown_signal` to `Some` (such as if the heartbeat future fails). in the + // former case, we'll never hit this `.take()` again due to the `assert` above, and in the + // latter case the `take()` will yet again succeed. + let mut shutdown_signal = self + .shutdown_signal + .take() + .expect("see shutdown_signal comment"); + // we set terminated = true proactively to maintain the invariant with shutdown_signal even + // in the case of a panic. it gets set to false in the heartbeat error case. + self.terminated = true; + let maybe_shutdown_timeout = self.shutdown_timeout; + + let report = tokio::select! { + // A signal from the user space received. + _ = &mut shutdown_signal => { + let nrunning = tokio::select! { + _ = async { tokio_sleep(maybe_shutdown_timeout.unwrap()).await; }, if maybe_shutdown_timeout.is_some() => { + 0 + }, + nrunning = self.force_fail_all_workers("termination signal received from user space") => { + nrunning + } + }; + Ok(stop::StopDetails::new(StopReason::GracefulShutdown, nrunning)) + }, + // A signal from the Faktory server received or an error occurred. + // Even though `Worker::listen_for_hearbeats` is not cancellation safe, we are ok using it here, + // since we are not `select!`ing in a loop and we are eventually _either_ marking the worker as + // terminated, _or_ re-creating a connection, i.e. we never end up re-using the "broken" connection. + exit = self.listen_for_heartbeats(&statuses) => { + // there are a couple of cases here: + // - we got TERMINATE, so we should just return, even if a worker is still running + // - we got TERMINATE and all workers have exited + // - we got an error from heartbeat() + // + // note that if it is an error from heartbeat(), the worker will _not_ be marked as + // terminated and _can_ be restarted + if exit.is_err() { + self.terminated = false; + } + // restore shutdown signal since it has not resolved + self.shutdown_signal = Some(shutdown_signal); - if let Ok(true) = exit { - let running = self.force_fail_all_workers().await; - if running != 0 { - return Ok(running); - } - } + if let Ok(true) = exit { + let nrunning = self.force_fail_all_workers("terminated").await; + if nrunning != 0 { + return Ok(stop::StopDetails::new(StopReason::ServerInstruction, nrunning)); + } + } - // we want to expose worker errors, or otherwise the heartbeat error - let mut results = Vec::with_capacity(workers_count); - while let Some(res) = join_set.join_next().await { - results.push(res.expect("joined ok")); - } + // we want to expose worker errors, or otherwise the heartbeat error + let mut results = Vec::with_capacity(nworkers); + while let Some(res) = join_set.join_next().await { + results.push(res.expect("joined ok")); + } + let results = results.into_iter().collect::, _>>(); - let result = results.into_iter().collect::, _>>(); + match exit { + Ok(_) => results.map(|_| stop::StopDetails::new(StopReason::ServerInstruction, 0)), + Err(e) => results.and(Err(e)), + } + } + }; - match exit { - Ok(_) => result.map(|_| 0), - Err(e) => result.and(Err(e)), - } + report } - /// Run this worker until the server tells us to exit or a connection cannot be re-established. + /// Run this worker until the server tells us to exit or a connection cannot be re-established, + /// or a signal from the user-space code has been received via a future passed to [`WorkerBuilder::with_graceful_shutdown`] /// - /// This function never returns. When the worker decides to exit, the process is terminated. + /// This function never returns. When the worker decides to exit or a signal to shutdown gracefully + /// has been received, the process is terminated within the [shutdown period](WorkerBuilder::shutdown_timeout). pub async fn run_to_completion(mut self, queues: &[Q]) -> ! where Q: AsRef, { - use std::process; while self.run(queues).await.is_err() { if self.reconnect().await.is_err() { break; diff --git a/src/worker/stop.rs b/src/worker/stop.rs new file mode 100644 index 00000000..228a214f --- /dev/null +++ b/src/worker/stop.rs @@ -0,0 +1,43 @@ +#[cfg(doc)] +use super::{Worker, WorkerBuilder}; + +#[derive(Debug, Default, Clone, PartialEq, Eq, Serialize, Deserialize)] +/// A reason why [`Worker::run`] has discontinued. +#[non_exhaustive] +pub enum StopReason { + /// Graceful shutdown completed. + /// + /// A future provided via [`WorkerBuilder::with_graceful_shutdown`] has resolved + /// signalling the worker to stop. + #[default] + GracefulShutdown, + + /// The Faktory server asked us to shut down. + /// + /// Under the hood, the worker is in constant communication with the Faktory server. + /// It fetches jobs and reports on processing results, but also listens for the server's + /// instructions. One of those instructions can be to disengage (e.g., to indicate that the + /// server is shutting down. + ServerInstruction, +} + +#[derive(Debug, Default, Clone, PartialEq, Eq, Serialize, Deserialize)] +/// Holds some details aroung a worker's run stoppage, such as the reason why this worker discontinued +/// and the number of workers that might still be processing jobs at that instant. +#[non_exhaustive] +pub struct StopDetails { + /// The [reason](StopReason) why the worker's run has discontinued. + pub reason: StopReason, + + /// The number of workers that might still be processing jobs. + pub workers_still_running: usize, +} + +impl StopDetails { + pub(crate) fn new(reason: StopReason, nrunning: usize) -> Self { + StopDetails { + reason, + workers_still_running: nrunning, + } + } +} diff --git a/tests/consumer.rs b/tests/consumer.rs index 5fed5a54..d1824962 100644 --- a/tests/consumer.rs +++ b/tests/consumer.rs @@ -57,8 +57,9 @@ mod mock; use faktory::*; -use std::{io, time::Duration}; -use tokio::{spawn, time::sleep}; +use std::{io, sync::Arc, time::Duration}; +use tokio::{spawn, sync::Mutex, time::sleep}; +use tokio_util::sync::CancellationToken; #[tokio::test(flavor = "multi_thread")] async fn hello() { @@ -259,7 +260,9 @@ async fn well_behaved() { s.push_bytes_to_read(0, b"+{\"state\":\"terminate\"}\r\n"); // at this point, c.run() should eventually return with Ok(0) indicating that it finished. - assert_eq!(jh.await.unwrap().unwrap(), 0); + let details = jh.await.unwrap().unwrap(); + assert_eq!(details.reason, StopReason::ServerInstruction); + assert_eq!(details.workers_still_running, 0); // heartbeat should have seen two beats (quiet + terminate) let written = s.pop_bytes_written(0); @@ -326,7 +329,9 @@ async fn no_first_job() { s.push_bytes_to_read(0, b"+{\"state\":\"terminate\"}\r\n"); // at this point, c.run() should eventually return with Ok(0) indicating that it finished. - assert_eq!(jh.await.unwrap().unwrap(), 0); + let details = jh.await.unwrap().unwrap(); + assert_eq!(details.reason, StopReason::ServerInstruction); + assert_eq!(details.workers_still_running, 0); // heartbeat should have seen two beats (quiet + terminate) let written = s.pop_bytes_written(0); @@ -403,7 +408,9 @@ async fn well_behaved_many() { s.push_bytes_to_read(0, b"+{\"state\":\"terminate\"}\r\n"); // at this point, c.run() should eventually return with Ok(0) indicating that it finished. - assert_eq!(jh.await.unwrap().unwrap(), 0); + let details = jh.await.unwrap().unwrap(); + assert_eq!(details.reason, StopReason::ServerInstruction); + assert_eq!(details.workers_still_running, 0); // heartbeat should have seen two beats (quiet + terminate) let written = s.pop_bytes_written(0); @@ -471,7 +478,7 @@ async fn terminate() { ); let jh = spawn(async move { - // Note how running a coordinating leads to mock::Stream::reconnect: + // Note how running a coordinating worker leads to mock::Stream::reconnect: // `Worker::run` -> `Worker::spawn_worker_into` -> `Worker::for_worker` -> `Client::connect_again` -> `Stream::reconnect` // // So when the `w.run` is triggered, `Stream::reconnect` will fire and the `take_next` member on the `mock::Inner` struct @@ -487,7 +494,9 @@ async fn terminate() { // at this point, c.run() should immediately return with Ok(1) indicating that one job is still // running. - assert_eq!(jh.await.unwrap().unwrap(), 1); + let details = jh.await.unwrap().unwrap(); + assert_eq!(details.reason, StopReason::ServerInstruction); + assert_eq!(details.workers_still_running, 1); // Heartbeat Thread (stream with index 0). // @@ -533,3 +542,114 @@ async fn terminate() { // But generally speaking, the graceful situation is when the number of `HI`s and the number of `END`s are // equal. Why did they decide for `END` instead of `BYE` in Faktory ? :smile: } + +#[tokio::test(flavor = "multi_thread")] +async fn heart_broken() { + // prepare streams for a coordinator, a worker, and potentially another yet + // another worker + let mut s = mock::Stream::new_unchecked(3); + + // create a token + let token = CancellationToken::new(); + let child_token = token.child_token(); + + // create a signalling future + let signal = async move { child_token.cancelled().await }; + + // prepare a worker without any handlers + let w: Worker<_, io::Error> = Worker::builder() + .with_graceful_shutdown(signal) + .shutdown_timeout(Duration::from_millis(500)) + .register_fn("foobar", |_j| async move { + // this magic 7 means: give the coordinating worker (and namely its heartbeat task) + // just enough time to send a heartbeat message to the server and get disappointed + // with the server response + println!("{:?}", _j); + sleep(Duration::from_secs(7)).await; + Ok(()) + }) + .connect_with(s.clone(), None) + .await + .unwrap(); + + // as if some producing client has enqueued a job + s.push_bytes_to_read( + 1, + b"$186\r\n\ + {\ + \"jid\":\"forever\",\ + \"queue\":\"default\",\ + \"jobtype\":\"foobar\",\ + \"args\":[],\ + \"created_at\":\"2024-07-18T17:41:35.772981326Z\",\ + \"enqueued_at\":\"2024-07-18T17:41:35.773318394Z\",\ + \"reserve_for\":600,\ + \"retry\":25\ + }\r\n", + ); + + // ignore the HELLO from the coordinatior + s.ignore(0); + + // start consuming + let w = Arc::new(Mutex::new(w)); + let w_clone = w.clone(); + let jh = spawn(async move { w_clone.lock().await.run(&["default"]).await }); + + // ack that the worker has processed the job + s.ok(1); + + // as if the Fatory sent non-sense in reply to the HEARTBEAT message, + // making this way the `Worker::run` stop, but without marking this worker + // as terminated + s.push_bytes_to_read(0, b"+{\"state\":\"heartbroken response\"}\r\n"); + + // at this point the `Worker::run` should have return control + // with an error rather that `StopDetails`, because the run was discontinued + // due to protocol error rather than a signal from the user code or the Faktory server + let error = jh.await.expect("joined ok").unwrap_err(); + + match error { + Error::Protocol(error::Protocol::BadType { expected, received }) => { + assert_eq!(expected, "heartbeat response"); + assert_eq!(received, "{\"state\":\"heartbroken response\"}") + } + e => unreachable!("{:?}", e), + } + + s.pop_bytes_written(0); // HEARTBEAT 1 + + // again, as if some producing client has enqueued a job + s.push_bytes_to_read( + 2, + b"$186\r\n\ + {\ + \"jid\":\"ornever\",\ + \"queue\":\"default\",\ + \"jobtype\":\"foobar\",\ + \"args\":[],\ + \"created_at\":\"2024-07-18T17:41:36.772981326Z\",\ + \"enqueued_at\":\"2024-07-18T17:41:36.773318394Z\",\ + \"reserve_for\":600,\ + \"retry\":25\ + }\r\n", + ); + + // we can re-run the worker and this will not cause a panic since this worker + // was not marked as terminated, so let's start consuming (reminder: we got one vacant stream) + let jh = spawn(async move { w.lock().await.run(&["default"]).await }); + + // give the newly spawned "processing" worker some time to consume the job and ... + tokio::time::sleep(Duration::from_secs(1)).await; + + // ... send a signal to return control + token.cancel(); + + let stop_details = jh + .await + .expect("joined ok") + .expect("stop details rather than error"); + assert_eq!(stop_details.reason, StopReason::GracefulShutdown); + // the worker was still processing the job + assert_eq!(stop_details.workers_still_running, 1); +} diff --git a/tests/mock/mod.rs b/tests/mock/mod.rs index f3858585..e1a940d4 100644 --- a/tests/mock/mod.rs +++ b/tests/mock/mod.rs @@ -12,6 +12,7 @@ mod inner; pub struct Stream { mine: inner::MockStream, all: Arc>, + check_count: bool, } impl Default for Stream { @@ -32,6 +33,7 @@ impl Reconnect for Stream { Ok(Stream { mine, all: Arc::clone(&self.all), + check_count: self.check_count, }) } } @@ -75,7 +77,7 @@ impl AsyncWrite for Stream { } impl Stream { - fn make(salt: Option<(usize, &str)>, streams: usize) -> Self { + fn make(salt: Option<(usize, &str)>, streams: usize, check_count: bool) -> Self { let streams = (0..streams) .map(|_| { let mut s = inner::MockStream::default(); @@ -107,15 +109,32 @@ impl Stream { Stream { mine, all: Arc::new(Mutex::new(inner)), + check_count, } } pub fn new(streams: usize) -> Self { - Self::make(None, streams) + Self::make(None, streams, true) + } + + /// Use this method if you want to opt out of comparing the number of used streams with the number of + /// initially allocated streams when `Stream` is being dropped (see [`Stream::drop`]). + /// + /// We are normally doing this sanity check just to make sure the test went as we expected, + /// like the number of spawned workers was correct (since each worker will get a dedicated strem). + /// + /// There is at least one scenario though where you will want to avoid this check. Imagine, the "coordinating" + /// worker is still there but a "processing" worker has been dropped, due to some protocol error. They can still + /// try and `Worker::run` the coordinator again and - since it has not been previously marked as terminated - the + /// coordinator will spawn another worker, and this can in theory repeat however many times as long as we have + /// allocated enough streams in [`Stream::all`]. So, in this scenario, we do not want to run our usual check whenever + /// a processing worker is being dropped. + pub fn new_unchecked(stream: usize) -> Self { + Self::make(None, stream, false) } pub fn with_salt(iters: usize, salt: &str) -> Self { - Self::make(Some((iters, salt)), 1) + Self::make(Some((iters, salt)), 1, true) } pub fn ok(&mut self, stream: usize) { @@ -138,6 +157,8 @@ impl Stream { impl Drop for Stream { fn drop(&mut self) { let x = self.all.lock().unwrap(); - assert_eq!(x.take_next, x.streams.len()); + if self.check_count { + assert_eq!(x.take_next, x.streams.len()); + } } } diff --git a/tests/real/community.rs b/tests/real/community.rs index e398dcd2..e1d14457 100644 --- a/tests/real/community.rs +++ b/tests/real/community.rs @@ -1,8 +1,9 @@ use crate::{assert_gte, skip_check}; -use faktory::{Client, Job, JobBuilder, JobId, Worker, WorkerBuilder, WorkerId}; +use faktory::{Client, Job, JobBuilder, JobId, StopReason, Worker, WorkerBuilder, WorkerId}; use serde_json::Value; use std::{io, sync, time::Duration}; use tokio::time as tokio_time; +use tokio_util::sync::CancellationToken; #[tokio::test(flavor = "multi_thread")] async fn hello_client() { @@ -603,8 +604,81 @@ async fn test_jobs_created_with_builder() { assert!(had_job); } -// It is generally not ok to mix blocking and not blocking tasks, -// we are doing so in this test simply to demonstrate it is _possible_. +use std::future::Future; +use std::pin::Pin; +use tokio::sync::mpsc; +fn process_hard_task( + sender: sync::Arc>, +) -> Box< + dyn Fn(Job) -> Pin> + Send>> + + Send + + Sync + + 'static, +> { + return Box::new(move |j: Job| { + let sender = sync::Arc::clone(&sender); + Box::pin(async move { + let complexity = j.args()[0].as_u64().unwrap(); + sender.send(true).await.unwrap(); // inform that we are now starting to process the job + tokio::time::sleep(tokio::time::Duration::from_millis(complexity)).await; + Ok::<(), io::Error>(()) + }) + }); +} + +#[tokio::test(flavor = "multi_thread")] +async fn test_shutdown_signals_handling() { + skip_check!(); + + let qname = "test_shutdown_signals_handling"; + let jkind = "heavy"; + let shutdown_timeout = Duration::from_millis(500); + + // get a client and a job to enqueue + let mut cl = Client::connect(None).await.unwrap(); + let j = JobBuilder::new(jkind) + .queue(qname) + // task will be being processed for at least 1 second + .args(vec![1000]) + .build(); + + let (tx, mut rx_for_test_purposes) = tokio::sync::mpsc::channel::(1); + let tx = sync::Arc::new(tx); + + // create a token + let token = CancellationToken::new(); + let child_token = token.child_token(); + + // create a signalling future + let signal = async move { child_token.cancelled().await }; + + // get a connected worker + let mut w = WorkerBuilder::default() + .with_graceful_shutdown(signal) + .shutdown_timeout(shutdown_timeout) + .register_fn(jkind, process_hard_task(tx)) + .connect(None) + .await + .unwrap(); + + // start consuming + let jh = tokio::spawn(async move { w.run(&[qname]).await }); + + // enqueue the job and wait for a message from the handler and ... + cl.enqueue(j).await.unwrap(); + rx_for_test_purposes.recv().await; + + assert!(!jh.is_finished()); + + // ... immediately signal to return control + token.cancel(); + + // one worker was processing a task when we interrupted it + let stop_details = jh.await.expect("joined ok").unwrap(); + assert_eq!(stop_details.reason, StopReason::GracefulShutdown); + assert_eq!(stop_details.workers_still_running, 1); +} + #[tokio::test(flavor = "multi_thread")] async fn test_jobs_with_blocking_handlers() { skip_check!();