aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToby Vincent <tobyv13@gmail.com>2022-09-27 14:39:51 -0500
committerToby Vincent <tobyv13@gmail.com>2022-09-27 14:39:51 -0500
commit62f11788d2e87176adeb86d7da198e9f18ae347c (patch)
tree0c6d02135467d46ea30bea47a54d6073d21ddeaa
parent03675f76b53abd63ea99e9e4af614d73615a496b (diff)
chore: update deps
-rw-r--r--Cargo.lock631
-rw-r--r--zone/Cargo.toml28
-rw-r--r--zone_core/Cargo.toml18
-rw-r--r--zone_core/src/container.rs2
-rw-r--r--zone_core/src/container/status.rs2
-rw-r--r--zone_nspawn/Cargo.toml12
-rw-r--r--zone_overlay/Cargo.toml8
-rw-r--r--zone_zfs/Cargo.toml19
-rw-r--r--zone_zfs/src/error.rs3
-rw-r--r--zone_zfs/src/file_system.rs224
-rw-r--r--zone_zfs/src/lib.rs5
-rw-r--r--zone_zfs/src/snapshot.rs54
-rw-r--r--zoned/Cargo.toml29
-rw-r--r--zoned/src/error.rs16
-rw-r--r--zoned/src/http.rs3
-rw-r--r--zoned/src/ws.rs28
16 files changed, 352 insertions, 730 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 94c8fc3..96e7599 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -22,15 +22,15 @@ dependencies = [
[[package]]
name = "anyhow"
-version = "1.0.56"
+version = "1.0.65"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4361135be9122e0870de935d7c439aef945b9f9ddd4199a553b5270b49c82a27"
+checksum = "98161a4e3e2184da77bb14f02184cdd111e83bbbcc9979dfee3c44b9a85f5602"
[[package]]
name = "async-trait"
-version = "0.1.53"
+version = "0.1.57"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600"
+checksum = "76464446b8bc32758d7e88ee1a804d9914cd9b1cb264c029899680b0be29826f"
dependencies = [
"proc-macro2",
"quote",
@@ -59,26 +59,27 @@ dependencies = [
[[package]]
name = "autocfg"
-version = "1.0.1"
+version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
+checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "axum"
-version = "0.4.8"
+version = "0.5.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c9f346c92c1e9a71d14fe4aaf7c2a5d9932cc4e5e48d8fb6641524416eb79ddd"
+checksum = "c9e3356844c4d6a6d6467b8da2cffb4a2820be256f50a3a386c9d152bab31043"
dependencies = [
"async-trait",
"axum-core",
"base64",
"bitflags",
- "bytes 1.1.0",
+ "bytes 1.2.1",
"futures-util",
"headers",
"http",
"http-body",
"hyper",
+ "itoa",
"matchit",
"memchr",
"mime",
@@ -87,10 +88,10 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
- "sha-1 0.10.0",
+ "sha-1",
"sync_wrapper",
"tokio",
- "tokio-tungstenite 0.16.1",
+ "tokio-tungstenite",
"tower",
"tower-http",
"tower-layer",
@@ -99,16 +100,18 @@ dependencies = [
[[package]]
name = "axum-core"
-version = "0.1.2"
+version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6dbcda393bef9c87572779cb8ef916f12d77750b27535dd6819fa86591627a51"
+checksum = "d9f0c0a60006f2a293d82d571f635042a72edf927539b7685bd62d361963839b"
dependencies = [
"async-trait",
- "bytes 1.1.0",
+ "bytes 1.2.1",
"futures-util",
"http",
"http-body",
"mime",
+ "tower-layer",
+ "tower-service",
]
[[package]]
@@ -125,15 +128,6 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "block-buffer"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4"
-dependencies = [
- "generic-array",
-]
-
-[[package]]
-name = "block-buffer"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324"
@@ -158,6 +152,12 @@ dependencies = [
]
[[package]]
+name = "bytecount"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2c676a478f63e9fa2dd5368a42f28bba0d6c560b775f38583c8bbaa7fcd67c9c"
+
+[[package]]
name = "byteorder"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -171,9 +171,9 @@ checksum = "e0dcbc35f504eb6fc275a6d20e4ebcda18cf50d40ba6fabff8c711fa16cb3b16"
[[package]]
name = "bytes"
-version = "1.1.0"
+version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8"
+checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db"
[[package]]
name = "cc"
@@ -194,30 +194,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
-name = "chrono"
-version = "0.4.19"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73"
-dependencies = [
- "libc",
- "num-integer",
- "num-traits",
- "time",
- "winapi",
-]
-
-[[package]]
name = "clap"
-version = "3.1.9"
+version = "3.2.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6aad2534fad53df1cc12519c5cda696dd3e20e6118a027e24054aea14a0bdcbe"
+checksum = "86447ad904c7fb335a790c9d7fe3d0d971dc523b8ccd1561a520de9a85302750"
dependencies = [
"atty",
"bitflags",
"clap_derive",
"clap_lex",
"indexmap",
- "lazy_static",
+ "once_cell",
"strsim",
"termcolor",
"textwrap",
@@ -225,20 +212,20 @@ dependencies = [
[[package]]
name = "clap_complete"
-version = "3.1.1"
+version = "3.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df6f3613c0a3cddfd78b41b10203eb322cb29b600cbdf808a7d3db95691b8e25"
+checksum = "3f7a2e0a962c45ce25afce14220bc24f9dade0a1787f185cecf96bfba7847cd8"
dependencies = [
"clap",
]
[[package]]
name = "clap_derive"
-version = "3.1.7"
+version = "3.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a3aab4734e083b809aaf5794e14e756d1c798d2c69c7f7de7a09a2f5214993c1"
+checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65"
dependencies = [
- "heck 0.4.0",
+ "heck",
"proc-macro-error",
"proc-macro2",
"quote",
@@ -247,9 +234,9 @@ dependencies = [
[[package]]
name = "clap_lex"
-version = "0.1.1"
+version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "189ddd3b5d32a70b35e7686054371742a937b0d99128e76dde6340210e966669"
+checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5"
dependencies = [
"os_str_bytes",
]
@@ -291,9 +278,9 @@ dependencies = [
[[package]]
name = "darling"
-version = "0.12.4"
+version = "0.14.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f2c43f534ea4b0b049015d00269734195e6d3f0f6635cb692251aca6f9f8b3c"
+checksum = "4529658bdda7fd6769b8614be250cdcfc3aeb0ee72fe66f9e41e5e5eb73eac02"
dependencies = [
"darling_core",
"darling_macro",
@@ -301,9 +288,9 @@ dependencies = [
[[package]]
name = "darling_core"
-version = "0.12.4"
+version = "0.14.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e91455b86830a1c21799d94524df0845183fa55bafd9aa137b01c7d1065fa36"
+checksum = "649c91bc01e8b1eac09fb91e8dbc7d517684ca6be8ebc75bb9cafc894f9fdb6f"
dependencies = [
"fnv",
"ident_case",
@@ -315,9 +302,9 @@ dependencies = [
[[package]]
name = "darling_macro"
-version = "0.12.4"
+version = "0.14.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "29b5acf0dea37a7f66f7b25d2c5e93fd46f8f6968b1a5d7a3e02e97768afc95a"
+checksum = "ddfc69c5bfcbd2fc09a0f38451d2daf0e372e367986a83906d1b0dbc88134fb5"
dependencies = [
"darling_core",
"quote",
@@ -326,18 +313,18 @@ dependencies = [
[[package]]
name = "derive_builder"
-version = "0.10.2"
+version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d13202debe11181040ae9063d739fa32cfcaaebe2275fe387703460ae2365b30"
+checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3"
dependencies = [
"derive_builder_macro",
]
[[package]]
name = "derive_builder_core"
-version = "0.10.2"
+version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "66e616858f6187ed828df7c64a6d71720d83767a7f19740b2d1b6fe6327b36e5"
+checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4"
dependencies = [
"darling",
"proc-macro2",
@@ -347,9 +334,9 @@ dependencies = [
[[package]]
name = "derive_builder_macro"
-version = "0.10.2"
+version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "58a94ace95092c5acb1e97a7e846b310cfbd499652f72297da7493f618a98d73"
+checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68"
dependencies = [
"derive_builder_core",
"syn",
@@ -357,20 +344,11 @@ dependencies = [
[[package]]
name = "digest"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"
-dependencies = [
- "generic-array",
-]
-
-[[package]]
-name = "digest"
version = "0.10.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506"
dependencies = [
- "block-buffer 0.10.2",
+ "block-buffer",
"crypto-common",
]
@@ -404,12 +382,12 @@ dependencies = [
[[package]]
name = "figment"
-version = "0.10.6"
+version = "0.10.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "790b4292c72618abbab50f787a477014fe15634f96291de45672ce46afe122df"
+checksum = "6e3bd154d9ae2f1bb0ada5b7eebd56529513efa5de7d2fc8c6adf33bc43260cf"
dependencies = [
"atomic",
- "parking_lot 0.11.2",
+ "parking_lot",
"pear",
"serde",
"tempfile",
@@ -457,9 +435,9 @@ checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394"
[[package]]
name = "futures"
-version = "0.3.21"
+version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e"
+checksum = "7f21eda599937fba36daeb58a22e8f5cee2d14c4a17b5b7739c7c8e5e3b8230c"
dependencies = [
"futures-channel",
"futures-core",
@@ -472,9 +450,9 @@ dependencies = [
[[package]]
name = "futures-channel"
-version = "0.3.21"
+version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010"
+checksum = "30bdd20c28fadd505d0fd6712cdfcb0d4b5648baf45faef7f852afb2399bb050"
dependencies = [
"futures-core",
"futures-sink",
@@ -482,15 +460,15 @@ dependencies = [
[[package]]
name = "futures-core"
-version = "0.3.21"
+version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3"
+checksum = "4e5aa3de05362c3fb88de6531e6296e85cde7739cccad4b9dfeeb7f6ebce56bf"
[[package]]
name = "futures-executor"
-version = "0.3.21"
+version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6"
+checksum = "9ff63c23854bee61b6e9cd331d523909f238fc7636290b96826e9cfa5faa00ab"
dependencies = [
"futures-core",
"futures-task",
@@ -499,15 +477,15 @@ dependencies = [
[[package]]
name = "futures-io"
-version = "0.3.21"
+version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b"
+checksum = "bbf4d2a7a308fd4578637c0b17c7e1c7ba127b8f6ba00b29f717e9655d85eb68"
[[package]]
name = "futures-macro"
-version = "0.3.21"
+version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512"
+checksum = "42cd15d1c7456c04dbdf7e88bcd69760d74f3a798d6444e16974b505b0e62f17"
dependencies = [
"proc-macro2",
"quote",
@@ -516,21 +494,21 @@ dependencies = [
[[package]]
name = "futures-sink"
-version = "0.3.21"
+version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868"
+checksum = "21b20ba5a92e727ba30e72834706623d94ac93a725410b6a6b6fbc1b07f7ba56"
[[package]]
name = "futures-task"
-version = "0.3.21"
+version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a"
+checksum = "a6508c467c73851293f390476d4491cf4d227dbabcd4170f3bb6044959b294f1"
[[package]]
name = "futures-util"
-version = "0.3.21"
+version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a"
+checksum = "44fb6cb1be61cc1d2e43b262516aafcf63b241cffdb1d3fa115f91d9c7b09c90"
dependencies = [
"futures-channel",
"futures-core",
@@ -562,7 +540,7 @@ checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753"
dependencies = [
"cfg-if 1.0.0",
"libc",
- "wasi",
+ "wasi 0.10.2+wasi-snapshot-preview1",
]
[[package]]
@@ -571,7 +549,7 @@ version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9f1f717ddc7b2ba36df7e871fd88db79326551d3d6f1fc406fbfd28b582ff8e"
dependencies = [
- "bytes 1.1.0",
+ "bytes 1.2.1",
"fnv",
"futures-core",
"futures-sink",
@@ -580,7 +558,7 @@ dependencies = [
"indexmap",
"slab",
"tokio",
- "tokio-util 0.6.9",
+ "tokio-util",
"tracing",
]
@@ -598,12 +576,12 @@ checksum = "4cff78e5788be1e0ab65b04d306b2ed5092c815ec97ec70f4ebd5aee158aa55d"
dependencies = [
"base64",
"bitflags",
- "bytes 1.1.0",
+ "bytes 1.2.1",
"headers-core",
"http",
"httpdate",
"mime",
- "sha-1 0.10.0",
+ "sha-1",
]
[[package]]
@@ -617,15 +595,6 @@ dependencies = [
[[package]]
name = "heck"
-version = "0.3.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c"
-dependencies = [
- "unicode-segmentation",
-]
-
-[[package]]
-name = "heck"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"
@@ -641,22 +610,22 @@ dependencies = [
[[package]]
name = "http"
-version = "0.2.5"
+version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1323096b05d41827dadeaee54c9981958c0f94e670bc94ed80037d1a7b8b186b"
+checksum = "ff8670570af52249509a86f5e3e18a08c60b177071826898fde8997cf5f6bfbb"
dependencies = [
- "bytes 1.1.0",
+ "bytes 1.2.1",
"fnv",
- "itoa 0.4.8",
+ "itoa",
]
[[package]]
name = "http-body"
-version = "0.4.4"
+version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6"
+checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1"
dependencies = [
- "bytes 1.1.0",
+ "bytes 1.2.1",
"http",
"pin-project-lite",
]
@@ -669,9 +638,9 @@ checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29"
[[package]]
name = "httparse"
-version = "1.5.1"
+version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503"
+checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904"
[[package]]
name = "httpdate"
@@ -690,11 +659,11 @@ dependencies = [
[[package]]
name = "hyper"
-version = "0.14.16"
+version = "0.14.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b7ec3e62bdc98a2f0393a5048e4c30ef659440ea6e0e572965103e72bd836f55"
+checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac"
dependencies = [
- "bytes 1.1.0",
+ "bytes 1.2.1",
"futures-channel",
"futures-core",
"futures-util",
@@ -703,7 +672,7 @@ dependencies = [
"http-body",
"httparse",
"httpdate",
- "itoa 0.4.8",
+ "itoa",
"pin-project-lite",
"socket2",
"tokio",
@@ -718,7 +687,7 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
dependencies = [
- "bytes 1.1.0",
+ "bytes 1.2.1",
"hyper",
"native-tls",
"tokio",
@@ -759,15 +728,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c8fae54786f62fb2918dcfae3d568594e50eb9b5c25bf04371af6fe7516452fb"
[[package]]
-name = "instant"
-version = "0.1.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
-dependencies = [
- "cfg-if 1.0.0",
-]
-
-[[package]]
name = "ipnet"
version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -775,12 +735,6 @@ checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9"
[[package]]
name = "itoa"
-version = "0.4.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
-
-[[package]]
-name = "itoa"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"
@@ -802,9 +756,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "libc"
-version = "0.2.119"
+version = "0.2.126"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4"
+checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836"
[[package]]
name = "lock_api"
@@ -817,9 +771,9 @@ dependencies = [
[[package]]
name = "log"
-version = "0.4.16"
+version = "0.4.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8"
+checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
dependencies = [
"cfg-if 1.0.0",
]
@@ -832,9 +786,9 @@ checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
[[package]]
name = "matchit"
-version = "0.4.6"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9376a4f0340565ad675d11fc1419227faf5f60cd7ac9cb2e7185a471f30af833"
+checksum = "73cbba799671b762df5a175adf59ce145165747bb891505c43d09aefbbf38beb"
[[package]]
name = "memchr"
@@ -850,24 +804,14 @@ checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d"
[[package]]
name = "mio"
-version = "0.8.0"
+version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ba272f85fa0b41fc91872be579b3bbe0f56b792aa361a380eb669469f68dafb2"
+checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf"
dependencies = [
"libc",
"log",
- "miow",
- "ntapi",
- "winapi",
-]
-
-[[package]]
-name = "miow"
-version = "0.3.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21"
-dependencies = [
- "winapi",
+ "wasi 0.11.0+wasi-snapshot-preview1",
+ "windows-sys 0.36.1",
]
[[package]]
@@ -902,34 +846,6 @@ dependencies = [
]
[[package]]
-name = "ntapi"
-version = "0.3.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44"
-dependencies = [
- "winapi",
-]
-
-[[package]]
-name = "num-integer"
-version = "0.1.44"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db"
-dependencies = [
- "autocfg",
- "num-traits",
-]
-
-[[package]]
-name = "num-traits"
-version = "0.2.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290"
-dependencies = [
- "autocfg",
-]
-
-[[package]]
name = "num_cpus"
version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -940,16 +856,19 @@ dependencies = [
]
[[package]]
-name = "once_cell"
-version = "1.8.0"
+name = "num_threads"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56"
+checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44"
+dependencies = [
+ "libc",
+]
[[package]]
-name = "opaque-debug"
-version = "0.3.0"
+name = "once_cell"
+version = "1.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
+checksum = "074864da206b4973b84eb91683020dbefd6a8c3f0f38e054d93954e891935e4e"
[[package]]
name = "openssl"
@@ -992,46 +911,23 @@ checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64"
[[package]]
name = "papergrid"
-version = "0.3.0"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "63709d10e2c2ec58f7bd91d8258d27ce80de090064b0ddf3a4bf38b907b61b8a"
+checksum = "453cf71f2a37af495a1a124bf30d4d7469cfbea58e9f2479be9d222396a518a2"
dependencies = [
+ "bytecount",
+ "fnv",
"unicode-width",
]
[[package]]
name = "parking_lot"
-version = "0.11.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99"
-dependencies = [
- "instant",
- "lock_api",
- "parking_lot_core 0.8.5",
-]
-
-[[package]]
-name = "parking_lot"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58"
dependencies = [
"lock_api",
- "parking_lot_core 0.9.1",
-]
-
-[[package]]
-name = "parking_lot_core"
-version = "0.8.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216"
-dependencies = [
- "cfg-if 1.0.0",
- "instant",
- "libc",
- "redox_syscall",
- "smallvec",
- "winapi",
+ "parking_lot_core",
]
[[package]]
@@ -1044,7 +940,7 @@ dependencies = [
"libc",
"redox_syscall",
"smallvec",
- "windows-sys",
+ "windows-sys 0.32.0",
]
[[package]]
@@ -1098,9 +994,9 @@ dependencies = [
[[package]]
name = "pin-project-lite"
-version = "0.2.7"
+version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443"
+checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"
[[package]]
name = "pin-utils"
@@ -1152,11 +1048,11 @@ dependencies = [
[[package]]
name = "proc-macro2"
-version = "1.0.36"
+version = "1.0.43"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029"
+checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab"
dependencies = [
- "unicode-xid",
+ "unicode-ident",
]
[[package]]
@@ -1180,9 +1076,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
[[package]]
name = "quote"
-version = "1.0.15"
+version = "1.0.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145"
+checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179"
dependencies = [
"proc-macro2",
]
@@ -1264,12 +1160,12 @@ dependencies = [
[[package]]
name = "reqwest"
-version = "0.11.10"
+version = "0.11.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb"
+checksum = "431949c384f4e2ae07605ccaa56d1d9d2ecdb5cadd4f9577ccfab29f2e5149fc"
dependencies = [
"base64",
- "bytes 1.1.0",
+ "bytes 1.2.1",
"encoding_rs",
"futures-core",
"futures-util",
@@ -1280,10 +1176,10 @@ dependencies = [
"hyper-tls",
"ipnet",
"js-sys",
- "lazy_static",
"log",
"mime",
"native-tls",
+ "once_cell",
"percent-encoding",
"pin-project-lite",
"serde",
@@ -1291,6 +1187,7 @@ dependencies = [
"serde_urlencoded",
"tokio",
"tokio-native-tls",
+ "tower-service",
"url",
"wasm-bindgen",
"wasm-bindgen-futures",
@@ -1366,18 +1263,18 @@ dependencies = [
[[package]]
name = "serde"
-version = "1.0.137"
+version = "1.0.145"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1"
+checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.137"
+version = "1.0.145"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be"
+checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c"
dependencies = [
"proc-macro2",
"quote",
@@ -1397,11 +1294,11 @@ dependencies = [
[[package]]
name = "serde_json"
-version = "1.0.79"
+version = "1.0.85"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95"
+checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44"
dependencies = [
- "itoa 1.0.1",
+ "itoa",
"ryu",
"serde",
]
@@ -1413,33 +1310,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
dependencies = [
"form_urlencoded",
- "itoa 1.0.1",
+ "itoa",
"ryu",
"serde",
]
[[package]]
name = "sha-1"
-version = "0.9.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6"
-dependencies = [
- "block-buffer 0.9.0",
- "cfg-if 1.0.0",
- "cpufeatures",
- "digest 0.9.0",
- "opaque-debug",
-]
-
-[[package]]
-name = "sha-1"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f"
dependencies = [
"cfg-if 1.0.0",
"cpufeatures",
- "digest 0.10.3",
+ "digest",
]
[[package]]
@@ -1462,13 +1346,13 @@ dependencies = [
[[package]]
name = "simplelog"
-version = "0.11.2"
+version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c1348164456f72ca0116e4538bdaabb0ddb622c7d9f16387c725af3e96d6001c"
+checksum = "48dfff04aade74dd495b007c831cd6f4e0cee19c344dd9dc0884c0289b70a786"
dependencies = [
- "chrono",
"log",
"termcolor",
+ "time",
]
[[package]]
@@ -1501,17 +1385,17 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
[[package]]
name = "strum"
-version = "0.23.0"
+version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cae14b91c7d11c9a851d3fbc80a963198998c2a64eec840477fa92d8ce9b70bb"
+checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f"
[[package]]
name = "strum_macros"
-version = "0.23.1"
+version = "0.24.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5bb0dc7ee9c15cea6199cde9a127fa16a4c5819af85395457ad72d68edc85a38"
+checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59"
dependencies = [
- "heck 0.3.3",
+ "heck",
"proc-macro2",
"quote",
"rustversion",
@@ -1520,13 +1404,13 @@ dependencies = [
[[package]]
name = "syn"
-version = "1.0.93"
+version = "1.0.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "04066589568b72ec65f42d65a1a52436e954b168773148893c020269563decf2"
+checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13"
dependencies = [
"proc-macro2",
"quote",
- "unicode-xid",
+ "unicode-ident",
]
[[package]]
@@ -1537,20 +1421,23 @@ checksum = "20518fe4a4c9acf048008599e464deb21beeae3d3578418951a189c235a7a9a8"
[[package]]
name = "tabled"
-version = "0.6.1"
+version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d15827061abcf689257b1841c8e2732b1dfcc3ef825b24ce6c606e1e9e1a7bde"
+checksum = "e5b2f8c37d26d87d2252187b0a45ea3cbf42baca10377c7e7eaaa2800fa9bf97"
dependencies = [
"papergrid",
"tabled_derive",
+ "unicode-width",
]
[[package]]
name = "tabled_derive"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "278ea3921cee8c5a69e0542998a089f7a14fa43c9c4e4f9951295da89bd0c943"
+checksum = "f9ee618502f497abf593e1c5c9577f34775b111480009ffccd7ad70d23fcaba8"
dependencies = [
+ "heck",
+ "proc-macro-error",
"proc-macro2",
"quote",
"syn",
@@ -1581,24 +1468,24 @@ dependencies = [
[[package]]
name = "textwrap"
-version = "0.15.0"
+version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb"
+checksum = "949517c0cf1bf4ee812e2e07e08ab448e3ae0d23472aee8a06c985f0c8815b16"
[[package]]
name = "thiserror"
-version = "1.0.31"
+version = "1.0.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a"
+checksum = "0a99cb8c4b9a8ef0e7907cd3b617cc8dc04d571c4e73c8ae403d80ac160bb122"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
-version = "1.0.31"
+version = "1.0.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a"
+checksum = "3a891860d3c8d66fec8e73ddb3765f90082374dbaaa833407b904a94f1a7eb43"
dependencies = [
"proc-macro2",
"quote",
@@ -1616,15 +1503,23 @@ dependencies = [
[[package]]
name = "time"
-version = "0.1.43"
+version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438"
+checksum = "3c3f9a28b618c3a6b9251b6908e9c99e04b9e5c02e6581ccbb67d59c34ef7f9b"
dependencies = [
+ "itoa",
"libc",
- "winapi",
+ "num_threads",
+ "time-macros",
]
[[package]]
+name = "time-macros"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42657b1a6f4d817cda8e7a0ace261fe0cc946cf3a80314390b22cc61ae080792"
+
+[[package]]
name = "tinyvec"
version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1641,17 +1536,18 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
[[package]]
name = "tokio"
-version = "1.17.0"
+version = "1.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2af73ac49756f3f7c01172e34a23e5d0216f6c32333757c2c61feb2bbff5a5ee"
+checksum = "0020c875007ad96677dcc890298f4b942882c5d4eb7cc8f439fc3bf813dc9c95"
dependencies = [
- "bytes 1.1.0",
+ "autocfg",
+ "bytes 1.2.1",
"libc",
"memchr",
"mio",
"num_cpus",
"once_cell",
- "parking_lot 0.12.0",
+ "parking_lot",
"pin-project-lite",
"signal-hook-registry",
"socket2",
@@ -1682,9 +1578,9 @@ dependencies = [
[[package]]
name = "tokio-stream"
-version = "0.1.8"
+version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50145484efff8818b5ccd256697f36863f587da82cf8b409c53adf1e840798e3"
+checksum = "f6edf2d6bc038a43d31353570e27270603f4648d18f5ed10c0e179abe43255af"
dependencies = [
"futures-core",
"pin-project-lite",
@@ -1693,26 +1589,14 @@ dependencies = [
[[package]]
name = "tokio-tungstenite"
-version = "0.16.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e80b39df6afcc12cdf752398ade96a6b9e99c903dfdc36e53ad10b9c366bca72"
-dependencies = [
- "futures-util",
- "log",
- "tokio",
- "tungstenite 0.16.0",
-]
-
-[[package]]
-name = "tokio-tungstenite"
-version = "0.17.1"
+version = "0.17.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "06cda1232a49558c46f8a504d5b93101d42c0bf7f911f12a105ba48168f821ae"
+checksum = "f714dd15bead90401d77e04243611caec13726c2408afd5b31901dfcdcb3b181"
dependencies = [
"futures-util",
"log",
"tokio",
- "tungstenite 0.17.2",
+ "tungstenite",
]
[[package]]
@@ -1721,21 +1605,7 @@ version = "0.6.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0"
dependencies = [
- "bytes 1.1.0",
- "futures-core",
- "futures-sink",
- "log",
- "pin-project-lite",
- "tokio",
-]
-
-[[package]]
-name = "tokio-util"
-version = "0.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64910e1b9c1901aaf5375561e35b9c057d95ff41a44ede043a03e09279eabaf1"
-dependencies = [
- "bytes 1.1.0",
+ "bytes 1.2.1",
"futures-core",
"futures-sink",
"log",
@@ -1763,7 +1633,6 @@ dependencies = [
"pin-project",
"pin-project-lite",
"tokio",
- "tokio-util 0.7.0",
"tower-layer",
"tower-service",
"tracing",
@@ -1771,12 +1640,12 @@ dependencies = [
[[package]]
name = "tower-http"
-version = "0.2.3"
+version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2bb284cac1883d54083a0edbdc9cabf931dfed87455f8c7266c01ece6394a43a"
+checksum = "7d342c6d58709c0a6d48d48dabbb62d4ef955cf5f0f3bbfd845838e7ae88dbae"
dependencies = [
"bitflags",
- "bytes 1.1.0",
+ "bytes 1.2.1",
"futures-core",
"futures-util",
"http",
@@ -1802,9 +1671,9 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6"
[[package]]
name = "tracing"
-version = "0.1.31"
+version = "0.1.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6c650a8ef0cd2dd93736f033d21cbd1224c5a967aa0c258d00fcf7dafef9b9f"
+checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307"
dependencies = [
"cfg-if 1.0.0",
"log",
@@ -1815,9 +1684,9 @@ dependencies = [
[[package]]
name = "tracing-attributes"
-version = "0.1.19"
+version = "0.1.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8276d9a4a3a558d7b7ad5303ad50b53d58264641b82914b7ada36bd762e7a716"
+checksum = "11c75893af559bc8e10716548bdef5cb2b983f8e637db9d0e15126b61b484ee2"
dependencies = [
"proc-macro2",
"quote",
@@ -1826,11 +1695,11 @@ dependencies = [
[[package]]
name = "tracing-core"
-version = "0.1.22"
+version = "0.1.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03cfcb51380632a72d3111cb8d3447a8d908e577d31beeac006f836383d29a23"
+checksum = "5aeea4303076558a00714b823f9ad67d58a3bbda1df83d8827d21193156e22f7"
dependencies = [
- "lazy_static",
+ "once_cell",
"valuable",
]
@@ -1847,9 +1716,9 @@ dependencies = [
[[package]]
name = "tracing-subscriber"
-version = "0.3.9"
+version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e0ab7bdc962035a87fba73f3acca9b8a8d0034c2e6f60b84aeaaddddc155dce"
+checksum = "60db860322da191b40952ad9affe65ea23e7dd6a5c442c2c42865810c6ab8e6b"
dependencies = [
"ansi_term",
"sharded-slab",
@@ -1867,37 +1736,18 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642"
[[package]]
name = "tungstenite"
-version = "0.16.0"
+version = "0.17.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6ad3713a14ae247f22a728a0456a545df14acf3867f905adff84be99e23b3ad1"
+checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0"
dependencies = [
"base64",
"byteorder",
- "bytes 1.1.0",
+ "bytes 1.2.1",
"http",
"httparse",
"log",
"rand",
- "sha-1 0.9.8",
- "thiserror",
- "url",
- "utf-8",
-]
-
-[[package]]
-name = "tungstenite"
-version = "0.17.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d96a2dea40e7570482f28eb57afbe42d97551905da6a9400acc5c328d24004f5"
-dependencies = [
- "base64",
- "byteorder",
- "bytes 1.1.0",
- "http",
- "httparse",
- "log",
- "rand",
- "sha-1 0.10.0",
+ "sha-1",
"thiserror",
"url",
"utf-8",
@@ -1925,6 +1775,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f"
[[package]]
+name = "unicode-ident"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf"
+
+[[package]]
name = "unicode-normalization"
version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1934,24 +1790,12 @@ dependencies = [
]
[[package]]
-name = "unicode-segmentation"
-version = "1.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b"
-
-[[package]]
name = "unicode-width"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
[[package]]
-name = "unicode-xid"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
-
-[[package]]
name = "url"
version = "2.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2027,6 +1871,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
[[package]]
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+
+[[package]]
name = "wasm-bindgen"
version = "0.2.78"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2104,13 +1954,13 @@ dependencies = [
[[package]]
name = "which"
-version = "4.2.4"
+version = "4.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2a5a7e487e921cf220206864a94a89b6c6905bfc19f1057fa26a4cb360e5c1d2"
+checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b"
dependencies = [
"either",
- "lazy_static",
"libc",
+ "once_cell",
]
[[package]]
@@ -2150,11 +2000,24 @@ version = "0.32.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3df6e476185f92a12c072be4a189a0210dcdcf512a1891d6dff9edb874deadc6"
dependencies = [
- "windows_aarch64_msvc",
- "windows_i686_gnu",
- "windows_i686_msvc",
- "windows_x86_64_gnu",
- "windows_x86_64_msvc",
+ "windows_aarch64_msvc 0.32.0",
+ "windows_i686_gnu 0.32.0",
+ "windows_i686_msvc 0.32.0",
+ "windows_x86_64_gnu 0.32.0",
+ "windows_x86_64_msvc 0.32.0",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.36.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2"
+dependencies = [
+ "windows_aarch64_msvc 0.36.1",
+ "windows_i686_gnu 0.36.1",
+ "windows_i686_msvc 0.36.1",
+ "windows_x86_64_gnu 0.36.1",
+ "windows_x86_64_msvc 0.36.1",
]
[[package]]
@@ -2164,30 +2027,60 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8e92753b1c443191654ec532f14c199742964a061be25d77d7a96f09db20bf5"
[[package]]
+name = "windows_aarch64_msvc"
+version = "0.36.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47"
+
+[[package]]
name = "windows_i686_gnu"
version = "0.32.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a711c68811799e017b6038e0922cb27a5e2f43a2ddb609fe0b6f3eeda9de615"
[[package]]
+name = "windows_i686_gnu"
+version = "0.36.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6"
+
+[[package]]
name = "windows_i686_msvc"
version = "0.32.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "146c11bb1a02615db74680b32a68e2d61f553cc24c4eb5b4ca10311740e44172"
[[package]]
+name = "windows_i686_msvc"
+version = "0.36.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024"
+
+[[package]]
name = "windows_x86_64_gnu"
version = "0.32.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c912b12f7454c6620635bbff3450962753834be2a594819bd5e945af18ec64bc"
[[package]]
+name = "windows_x86_64_gnu"
+version = "0.36.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1"
+
+[[package]]
name = "windows_x86_64_msvc"
version = "0.32.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "504a2476202769977a040c6364301a3f65d0cc9e3fb08600b2bda150a0488316"
[[package]]
+name = "windows_x86_64_msvc"
+version = "0.36.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680"
+
+[[package]]
name = "winreg"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2239,7 +2132,7 @@ dependencies = [
"tabled",
"tokio",
"tokio-stream",
- "tokio-tungstenite 0.17.1",
+ "tokio-tungstenite",
"zone_core",
]
@@ -2290,7 +2183,6 @@ name = "zone_zfs"
version = "0.1.0"
dependencies = [
"byte-unit",
- "chrono",
"derive_builder",
"figment",
"serde",
@@ -2306,7 +2198,7 @@ version = "0.1.0"
dependencies = [
"anyhow",
"axum",
- "bytes 1.1.0",
+ "bytes 1.2.1",
"figment",
"futures",
"serde",
@@ -2318,5 +2210,6 @@ dependencies = [
"wspty",
"zone_core",
"zone_nspawn",
+ "zone_overlay",
"zone_zfs",
]
diff --git a/zone/Cargo.toml b/zone/Cargo.toml
index ee79291..1c000c1 100644
--- a/zone/Cargo.toml
+++ b/zone/Cargo.toml
@@ -13,17 +13,17 @@ keywords = ["zone", "zoned", "container", "containers"]
workspace = ".."
[dependencies]
-anyhow = "1.0.56"
-clap = { version = "3.1.9", features = ["derive", "env"] }
-clap_complete = "3.1.1"
-futures = "0.3.21"
-futures-channel = "0.3.21"
-log = "0.4.16"
-reqwest = { version = "0.11.10", features = ["blocking", "json"] }
-serde_json = "1.0.79"
-simplelog = "0.11.2"
-tabled = "0.6.1"
-tokio = "1.17.0"
-tokio-stream = "0.1.8"
-tokio-tungstenite = "0.17.1"
-zone_core = { version = "0.1.0", path = "../zone_core" }
+anyhow = "1.0.65"
+clap = { version = "3.2.22", features = ["derive", "env"] }
+clap_complete = "3.2.5"
+futures = "0.3.24"
+futures-channel = "0.3.24"
+log = "0.4.17"
+reqwest = { version = "0.11.12", features = ["blocking", "json"] }
+serde_json = "1.0.85"
+simplelog = "0.12.0"
+tabled = "0.8.0"
+tokio = "1.21.1"
+tokio-stream = "0.1.10"
+tokio-tungstenite = "0.17.2"
+zone_core = { path = "../zone_core" }
diff --git a/zone_core/Cargo.toml b/zone_core/Cargo.toml
index aa45cb3..0f79478 100644
--- a/zone_core/Cargo.toml
+++ b/zone_core/Cargo.toml
@@ -12,15 +12,15 @@ keywords = ["zone", "zoned"]
workspace = ".."
[dependencies]
-async-trait = "0.1.53"
-clap = { version = "3.1.9", default-features = false, features = ["std", "derive"] }
-derive_builder = "0.10.2"
-serde = "1.0.136"
-strum = "0.23.0"
-strum_macros = "0.23.1"
-tabled = "0.6.1"
-thiserror = "1.0.30"
-tokio = "1.17.0"
+async-trait = "0.1.57"
+clap = { version = "3.2.22", default-features = false, features = ["std", "derive"] }
+derive_builder = "0.11.2"
+serde = "1.0.145"
+strum = "0.24.1"
+strum_macros = "0.24.3"
+tabled = "0.8.0"
+thiserror = "1.0.36"
+tokio = "1.21.1"
wspty = "0.1.1"
[features]
diff --git a/zone_core/src/container.rs b/zone_core/src/container.rs
index db7458e..058d7f3 100644
--- a/zone_core/src/container.rs
+++ b/zone_core/src/container.rs
@@ -11,7 +11,7 @@ pub use self::status::Status;
mod error;
mod status;
-#[derive(Debug, PartialEq, Default, Serialize, Deserialize, Tabled, Clone, Args)]
+#[derive(Debug, PartialEq, Eq, Default, Serialize, Deserialize, Tabled, Clone, Args)]
#[serde(rename_all = "camelCase")]
pub struct Container {
#[tabled("ID")]
diff --git a/zone_core/src/container/status.rs b/zone_core/src/container/status.rs
index 73edf7d..7647e6f 100644
--- a/zone_core/src/container/status.rs
+++ b/zone_core/src/container/status.rs
@@ -13,4 +13,4 @@ impl Default for Status {
fn default() -> Self {
Status::Unknown
}
-} \ No newline at end of file
+}
diff --git a/zone_nspawn/Cargo.toml b/zone_nspawn/Cargo.toml
index 9e423aa..0734382 100644
--- a/zone_nspawn/Cargo.toml
+++ b/zone_nspawn/Cargo.toml
@@ -13,11 +13,11 @@ keywords = ["zone", "zoned", "systemd", "nspawn", "systemd-nspawn"]
workspace = ".."
[dependencies]
-async-trait = "0.1.53"
-serde = "1.0.136"
+async-trait = "0.1.57"
+serde = "1.0.145"
serde_ini = "0.2.0"
-serde_json = "1.0.78"
-thiserror = "1.0.30"
-tokio = { version = "1.17.0", default-features = false, features = ["process"] }
+serde_json = "1.0.85"
+thiserror = "1.0.36"
+tokio = { version = "1.21.1", default-features = false, features = ["process"] }
wspty = "0.1.1"
-zone_core = { version = "0.1.0", path = "../zone_core" }
+zone_core = { path = "../zone_core" }
diff --git a/zone_overlay/Cargo.toml b/zone_overlay/Cargo.toml
index 97f3590..467274a 100644
--- a/zone_overlay/Cargo.toml
+++ b/zone_overlay/Cargo.toml
@@ -6,9 +6,9 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
-figment = { version = "0.10.6", features = ["toml", "env"] }
+figment = { version = "0.10.7", features = ["toml", "env"] }
fs_extra = "1.2.0"
-serde = { version = "1.0.137", features = ["derive"] }
-thiserror = "1.0.31"
+serde = { version = "1.0.145", features = ["derive"] }
+thiserror = "1.0.36"
walkdir = "2.3.2"
-zone_core = { version = "0.1.0", path = "../zone_core" }
+zone_core = { path = "../zone_core" }
diff --git a/zone_zfs/Cargo.toml b/zone_zfs/Cargo.toml
index 097ffbd..66c710f 100644
--- a/zone_zfs/Cargo.toml
+++ b/zone_zfs/Cargo.toml
@@ -13,19 +13,16 @@ keywords = ["zone", "zoned", "zfs"]
workspace = ".."
[dependencies]
-byte-unit = { version = "4.0.13", features = [
+byte-unit = { version = "4.0.14", features = [
"serde",
], default-features = false }
-chrono = { version = "0.4.19", optional = true }
-derive_builder = "0.10.2"
-figment = { version = "0.10.6", features = ["toml", "env"] }
-serde = { version = "1.0.136", features = ["derive"] }
-thiserror = "1.0.30"
-tracing = "0.1.29"
-zone_core = { version = "0.1.0", path = "../zone_core" }
+derive_builder = "0.11.2"
+figment = { version = "0.10.7", features = ["toml", "env"] }
+serde = { version = "1.0.145", features = ["derive"] }
+thiserror = "1.0.36"
+tracing = "0.1.36"
+zone_core = { path = "../zone_core" }
[dev-dependencies]
figment = { version = "*", features = ["test"] }
-which = "4.2.4"
-
-[features]
+which = "4.3.0"
diff --git a/zone_zfs/src/error.rs b/zone_zfs/src/error.rs
index 9125cda..7a76d3c 100644
--- a/zone_zfs/src/error.rs
+++ b/zone_zfs/src/error.rs
@@ -26,9 +26,6 @@ pub enum Error {
#[error("Config Error: {0:?}")]
Config(#[from] figment::Error),
-
- #[error(transparent)]
- Builder(#[from] crate::file_system::FileSystemBuilderError),
}
#[derive(thiserror::Error, Debug)]
diff --git a/zone_zfs/src/file_system.rs b/zone_zfs/src/file_system.rs
deleted file mode 100644
index 3d460ca..0000000
--- a/zone_zfs/src/file_system.rs
+++ /dev/null
@@ -1,224 +0,0 @@
-use crate::{
- error::{CommandError, FileSystemError},
- Error, Result, Snapshot,
-};
-use byte_unit::Byte;
-use derive_builder::Builder;
-use std::{
- ffi::{OsStr, OsString},
- fmt::Display,
- path::PathBuf,
- process::Command,
-};
-
-macro_rules! concat_opt [
- ($($value:expr),+) => ({
- let mut _temp = OsString::new();
- $(_temp.push($value);)+
- _temp
- })
-];
-
-#[derive(Debug, Default, Clone, Builder)]
-#[builder(
- build_fn(private, name = "build_file_system"),
- derive(Debug),
- setter(into),
- default
-)]
-pub struct FileSystem {
- pub(crate) dataset: PathBuf,
- pub(crate) mountpoint: PathBuf,
- pub(crate) quota: Byte,
-}
-
-impl Display for FileSystem {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(f, "{}", self.dataset.to_string_lossy())
- }
-}
-
-impl FileSystemBuilder {
- pub fn build(&self) -> Result<FileSystem> {
- self.build_file_system()?.create()
- }
-
- pub fn build_from(&self, snapshot: &Snapshot) -> Result<FileSystem> {
- self.build_file_system()?.create_from(snapshot)
- }
-
- pub fn to_file_system(&self) -> Result<FileSystem> {
- self.build_file_system().map_err(Error::from)
- }
-}
-
-impl FileSystem {
- pub fn builder() -> FileSystemBuilder {
- FileSystemBuilder::default()
- }
-
- /// Get a reference to the file system's dataset.
- pub fn dataset(&self) -> &PathBuf {
- &self.dataset
- }
-
- /// Get a reference to the file system's mountpoint.
- pub fn mountpoint(&self) -> &PathBuf {
- &self.mountpoint
- }
-
- /// Get the file system's quota.
- pub fn quota(&self) -> Byte {
- self.quota
- }
-
- /// Get the value of the file system's `option` from ZFS
- pub fn get_opt<T>(&self, option: T) -> Result<String>
- where
- T: AsRef<OsStr>,
- {
- let output = Command::new("zfs")
- .arg("get")
- .arg("-H")
- .arg("-o")
- .arg("value,source")
- .arg(&option)
- .arg(&self.dataset)
- .output()
- .map_err(CommandError::from)?;
-
- output
- .status
- .code()
- .map_or(Ok(output), |c| Err(CommandError::from(c)))
- .and_then(|o| String::from_utf8(o.stdout).map_err(CommandError::from))
- .map_err(Error::from)
- }
-
- pub fn set_opt<T, U>(&self, option: T, value: U) -> Result<()>
- where
- T: AsRef<OsStr>,
- U: AsRef<OsStr>,
- {
- Command::new("zfs")
- .arg("set")
- .arg(concat_opt!(&option, "=", value))
- .arg(&self.dataset)
- .output()
- .map_err(CommandError::from)?
- .status
- .code()
- .map_or(Ok(()), |c| Err(CommandError::from(c)))
- .map_err(Error::from)
- }
-
- pub fn set_quota(&mut self, quota: Byte) -> Result<Self> {
- self.set_opt("quota", quota.to_string())?;
- self.quota = quota;
- Ok(self.to_owned())
- }
-
- pub fn set_mountpoint(&mut self, mountpoint: PathBuf) -> Result<Self> {
- self.set_opt("mountpoint", &mountpoint)?;
- self.mountpoint = mountpoint;
- Ok(self.to_owned())
- }
-
- pub fn get_snapshots(&self) -> Result<Vec<Snapshot>> {
- let output = Command::new("zfs")
- .arg("list")
- .arg("-H")
- .arg("-o")
- .arg("name")
- .arg("-t")
- .arg("snapshot")
- .arg(&self.dataset)
- .output()
- .map_err(CommandError::from)?;
-
- output
- .status
- .code()
- .map_or(Ok(output), |c| Err(CommandError::from(c)))
- .and_then(|o| String::from_utf8(o.stdout).map_err(From::from))?
- .split_whitespace()
- .filter_map(|s| Snapshot::try_from(s).ok())
- .map(Ok)
- .collect()
- }
-
- #[cfg(feature = "chrono")]
- pub fn get_latest_snapshot(&self) -> Result<Option<Snapshot>> {
- self.get_snapshots()
- .map(|v| v.into_iter().max_by_key(Snapshot::timestamp))
- }
-
- pub(crate) fn create(&self) -> Result<Self> {
- Command::new("zfs")
- .arg("create")
- .arg("-o")
- .arg(concat_opt!("mountpoint=", &self.mountpoint))
- .arg(concat_opt!("quota=", self.quota.to_string()))
- .output()
- .map_err(CommandError::from)?
- .status
- .code()
- .map_or(Ok(self.to_owned()), |c| Err(FileSystemError::Creating(c)))
- .map_err(Error::from)
- }
-
- pub(crate) fn create_from(&self, snapshot: &Snapshot) -> Result<Self> {
- Command::new("zfs")
- .arg("clone")
- .arg(&snapshot.name())
- .arg(&self.dataset)
- .output()
- .map_err(CommandError::from)?
- .status
- .code()
- .map_or(Ok(self.to_owned()), |c| Err(FileSystemError::Cloning(c)))
- .map_err(Error::from)
- }
-
- pub fn destroy(&self, force: bool) -> Result<()> {
- let args = if force {
- vec!["destroy", "-f"]
- } else {
- vec!["destroy"]
- };
-
- Command::new("zfs")
- .args(args)
- .arg(&self.dataset)
- .output()
- .map_err(CommandError::from)?
- .status
- .code()
- .map_or(Ok(()), |c| Err(FileSystemError::Destroying(c)))
- .map_err(Error::from)
- }
-
- pub fn mount(&self) -> Result<()> {
- Command::new("zfs")
- .arg("mount")
- .arg(&self.dataset)
- .output()
- .map_err(CommandError::from)?
- .status
- .code()
- .map_or(Ok(()), |c| Err(FileSystemError::Mounting(c)))
- .map_err(Error::from)
- }
-
- pub fn unmount(&self) -> Result<()> {
- Command::new("zfs")
- .arg("unmount")
- .arg(&self.dataset)
- .output()
- .map_err(CommandError::from)?
- .status
- .code()
- .map_or(Ok(()), |c| Err(FileSystemError::Unmounting(c)))
- .map_err(Error::from)
- }
-}
diff --git a/zone_zfs/src/lib.rs b/zone_zfs/src/lib.rs
index 410f474..4f635b1 100644
--- a/zone_zfs/src/lib.rs
+++ b/zone_zfs/src/lib.rs
@@ -1,14 +1,9 @@
pub use crate::config::Config;
pub use crate::error::{Error, Result};
-pub use crate::file_system::FileSystem;
-pub use crate::file_system::FileSystemBuilder;
-pub use crate::snapshot::Snapshot;
pub use crate::zfs::ZFS;
mod config;
mod error;
-mod file_system;
-mod snapshot;
mod zfs;
#[cfg(test)]
diff --git a/zone_zfs/src/snapshot.rs b/zone_zfs/src/snapshot.rs
deleted file mode 100644
index 84db4e3..0000000
--- a/zone_zfs/src/snapshot.rs
+++ /dev/null
@@ -1,54 +0,0 @@
-use crate::{Error, FileSystem, Result};
-use std::{ffi::OsString, path::PathBuf};
-
-#[cfg(feature = "chrono")]
-use chrono::{DateTime, Utc, MIN_DATETIME};
-
-#[derive(Debug)]
-pub struct Snapshot {
- name: OsString,
- dataset: PathBuf,
-
- #[cfg(feature = "chrono")]
- timestamp: DateTime<Utc>,
-}
-
-impl TryFrom<&str> for Snapshot {
- type Error = Error;
-
- fn try_from(s: &str) -> Result<Self> {
- s.split_once('@')
- .map(|(d, n)| Snapshot {
- name: n.into(),
- dataset: d.into(),
-
- #[cfg(feature = "chrono")]
- timestamp: n.parse().unwrap_or(MIN_DATETIME),
- })
- .ok_or_else(|| Error::Snapshot(format!("Failed to parse snapshot: {:?}", s)))
- }
-}
-
-impl Snapshot {
- pub fn clone_new(&self, path: String) -> Result<FileSystem> {
- FileSystem::builder()
- .dataset(&self.dataset.join(path))
- .build_from(self.to_owned())
- }
-
- /// Get a reference to the snapshot's name.
- pub fn name(&self) -> &OsString {
- &self.name
- }
-
- /// Get a reference to the snapshot's dataset.
- pub fn dataset(&self) -> &PathBuf {
- &self.dataset
- }
-
- #[cfg(feature = "chrono")]
- /// Get the snapshot's timestamp.
- pub fn timestamp(&self) -> DateTime<Utc> {
- self.timestamp
- }
-}
diff --git a/zoned/Cargo.toml b/zoned/Cargo.toml
index f4dee0d..e15e217 100644
--- a/zoned/Cargo.toml
+++ b/zoned/Cargo.toml
@@ -13,18 +13,19 @@ keywords = ["zone", "zoned", "container", "containers", "websocket"]
workspace = ".."
[dependencies]
-anyhow = "1.0.53"
-axum = { version = "0.4.8", features = ["json", "ws", "headers", "http2"] }
-bytes = "1.1.0"
-figment = { version = "0.10.6", features = ["toml", "env", "test"] }
-futures = "0.3.21"
-serde = "1.0.136"
-serde_json = "1.0.79"
-thiserror = "1.0.30"
-tokio = { version = "1.17.0", features = ["full"] }
-tracing = "0.1.31"
-tracing-subscriber = "0.3.9"
+anyhow = "1.0.65"
+axum = { version = "0.5.16", features = ["json", "ws", "headers", "http2"] }
+bytes = "1.2.1"
+figment = { version = "0.10.7", features = ["toml", "env", "test"] }
+futures = "0.3.24"
+serde = "1.0.145"
+serde_json = "1.0.85"
+thiserror = "1.0.36"
+tokio = { version = "1.21.1", features = ["full"] }
+tracing = "0.1.36"
+tracing-subscriber = "0.3.15"
wspty = "0.1.1"
-zone_core = { version = "0.1.0", path = "../zone_core" }
-zone_nspawn = { version = "0.1.0", path = "../zone_nspawn" }
-zone_zfs = { version = "0.1.0", path = "../zone_zfs", features = ["chrono"] }
+zone_core = { path = "../zone_core" }
+zone_nspawn = { path = "../zone_nspawn" }
+zone_zfs = { path = "../zone_zfs" }
+zone_overlay = { path = "../zone_overlay" }
diff --git a/zoned/src/error.rs b/zoned/src/error.rs
index c416a01..18f4b77 100644
--- a/zoned/src/error.rs
+++ b/zoned/src/error.rs
@@ -16,14 +16,11 @@ pub enum Error {
#[error("Container Error: {0:?}")]
Container(String),
- #[error("WebSocket Error: {0:?}")]
- WebSocket(String),
-
#[error("Container not found")]
NotFound,
- #[error("Missing initialization message")]
- WebSocketMissingInit,
+ #[error("WebSocket Error: {0:?}")]
+ WebSocket(#[from] WebSocketError),
#[error("Command Error: {0:?}")]
Command(#[from] CommandError),
@@ -97,3 +94,12 @@ pub enum PtyError {
#[error("Failed to resize PTY: {0:?}")]
Resize(#[source] std::io::Error),
}
+
+#[derive(thiserror::Error, Debug)]
+pub enum WebSocketError {
+ #[error("Missing initialization message")]
+ Initialization,
+
+ #[error("Axum Error: {0:?}")]
+ Axum(#[from] axum::Error),
+}
diff --git a/zoned/src/http.rs b/zoned/src/http.rs
index 5149b5d..59bdaf7 100644
--- a/zoned/src/http.rs
+++ b/zoned/src/http.rs
@@ -8,8 +8,7 @@ use axum::{
use std::{process::Command, sync::Arc};
use tracing::{info, instrument, warn};
use zone_core::{
- CloneOptions, Container, ContainerOptions, Status, FilterContainer, Runtime,
- Templates, Volumes,
+ CloneOptions, Container, ContainerOptions, FilterContainer, Runtime, Status, Templates, Volumes,
};
use crate::{error::CommandError, ws, Result, State};
diff --git a/zoned/src/ws.rs b/zoned/src/ws.rs
index 7c49079..fc85d2e 100644
--- a/zoned/src/ws.rs
+++ b/zoned/src/ws.rs
@@ -11,11 +11,14 @@ use tokio::{
io::{AsyncReadExt, AsyncWriteExt},
sync::mpsc,
};
-use tracing::{instrument, warn};
+use tracing::{error, instrument, warn};
use wspty::PtyMaster;
use zone_core::{Container, FilterContainer, Runtime};
-use crate::{error::PtyError, Error, Result, State};
+use crate::{
+ error::{PtyError, WebSocketError},
+ Error, Result, State,
+};
#[derive(Deserialize, Debug)]
struct WindowSize {
@@ -23,19 +26,28 @@ struct WindowSize {
rows: u16,
}
-// #[instrument(err, skip_all)]
-pub async fn handler(mut ws_stream: WebSocket, state: Arc<State>) -> Result<()> {
+pub async fn handler(ws_stream: WebSocket, state: Arc<State>) {
+ if let Err(err) = spawn(ws_stream, state).await {
+ error!("{}", err);
+ // if let Err(_) = ws_stream.send(Message::Text(format!("{}", err))).await {
+ // error!("Failed to send WebSocket error message response: {}", err);
+ // }
+ }
+}
+
+#[instrument(err, skip_all)]
+pub async fn spawn(mut ws_stream: WebSocket, state: Arc<State>) -> Result<()> {
let msg = loop {
match ws_stream.next().await {
Some(Ok(Message::Text(msg))) => break msg,
- Some(Ok(_)) => return Err(Error::WebSocketMissingInit),
- Some(Err(err)) => return Err(err.into()),
+ Some(Err(err)) => Err(Error::from(err)),
+ Some(_) => Err(WebSocketError::Initialization.into()),
None => continue,
- };
+ }?;
};
let container =
- serde_json::from_str::<Container>(&msg).map_err(|_| Error::WebSocketMissingInit)?;
+ serde_json::from_str::<Container>(&msg).or(Err(WebSocketError::Initialization))?;
state
.nspawn