start unpicking influxdb
This commit is contained in:
232
Cargo.lock
generated
232
Cargo.lock
generated
@@ -20,15 +20,6 @@ dependencies = [
|
|||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "ansi_term"
|
|
||||||
version = "0.12.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
|
|
||||||
dependencies = [
|
|
||||||
"winapi",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "anstream"
|
name = "anstream"
|
||||||
version = "0.6.21"
|
version = "0.6.21"
|
||||||
@@ -264,7 +255,7 @@ dependencies = [
|
|||||||
"tokio-stream",
|
"tokio-stream",
|
||||||
"tokio-util",
|
"tokio-util",
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-subscriber 0.3.22",
|
"tracing-subscriber",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -296,7 +287,7 @@ dependencies = [
|
|||||||
"num_enum",
|
"num_enum",
|
||||||
"rand",
|
"rand",
|
||||||
"siphasher",
|
"siphasher",
|
||||||
"thiserror 2.0.18",
|
"thiserror",
|
||||||
"tokio",
|
"tokio",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -449,16 +440,6 @@ dependencies = [
|
|||||||
"syn 2.0.114",
|
"syn 2.0.114",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "dashmap"
|
|
||||||
version = "4.0.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c"
|
|
||||||
dependencies = [
|
|
||||||
"cfg-if",
|
|
||||||
"num_cpus",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "deranged"
|
name = "deranged"
|
||||||
version = "0.5.5"
|
version = "0.5.5"
|
||||||
@@ -498,12 +479,6 @@ version = "0.3.4"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "780955b8b195a21ab8e4ac6b60dd1dbdcec1dc6c51c0617964b08c81785e12c9"
|
checksum = "780955b8b195a21ab8e4ac6b60dd1dbdcec1dc6c51c0617964b08c81785e12c9"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "dotenv"
|
|
||||||
version = "0.15.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dyn-clone"
|
name = "dyn-clone"
|
||||||
version = "1.0.20"
|
version = "1.0.20"
|
||||||
@@ -779,12 +754,6 @@ version = "0.5.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "hermit-abi"
|
|
||||||
version = "0.5.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hex"
|
name = "hex"
|
||||||
version = "0.4.3"
|
version = "0.4.3"
|
||||||
@@ -1019,33 +988,26 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "influxdb2"
|
name = "influxdb2"
|
||||||
version = "0.3.9"
|
version = "0.5.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a152a72a5d8d387580a1c6df5dc078891ba914d8462da51f7286321680f998b4"
|
checksum = "24cc9f9d9fee9ebda1a77b61769cde513e03ad09607b347602f4ea887657689e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.13.1",
|
"base64 0.13.1",
|
||||||
"bytes",
|
"bytes",
|
||||||
"chrono",
|
"chrono",
|
||||||
"csv",
|
"csv",
|
||||||
"dotenv",
|
|
||||||
"fallible-iterator",
|
"fallible-iterator",
|
||||||
"futures",
|
"futures",
|
||||||
"go-parse-duration",
|
"go-parse-duration",
|
||||||
"influxdb2-derive",
|
"influxdb2-derive",
|
||||||
"influxdb2-structmap",
|
"influxdb2-structmap",
|
||||||
"nom",
|
|
||||||
"opentelemetry",
|
|
||||||
"ordered-float",
|
"ordered-float",
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
"reqwest",
|
"reqwest",
|
||||||
|
"secrecy",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"serde_qs",
|
|
||||||
"smallvec",
|
|
||||||
"snafu",
|
"snafu",
|
||||||
"tempfile",
|
|
||||||
"tracing",
|
|
||||||
"tracing-subscriber 0.2.25",
|
|
||||||
"url",
|
"url",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1206,22 +1168,13 @@ dependencies = [
|
|||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "matchers"
|
|
||||||
version = "0.0.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1"
|
|
||||||
dependencies = [
|
|
||||||
"regex-automata 0.1.10",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "matchers"
|
name = "matchers"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9"
|
checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"regex-automata 0.4.13",
|
"regex-automata",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1236,12 +1189,6 @@ version = "0.3.17"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
|
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "minimal-lexical"
|
|
||||||
version = "0.2.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mio"
|
name = "mio"
|
||||||
version = "1.1.1"
|
version = "1.1.1"
|
||||||
@@ -1319,16 +1266,6 @@ dependencies = [
|
|||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "nom"
|
|
||||||
version = "7.1.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
|
|
||||||
dependencies = [
|
|
||||||
"memchr",
|
|
||||||
"minimal-lexical",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nu-ansi-term"
|
name = "nu-ansi-term"
|
||||||
version = "0.50.3"
|
version = "0.50.3"
|
||||||
@@ -1353,16 +1290,6 @@ dependencies = [
|
|||||||
"autocfg",
|
"autocfg",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "num_cpus"
|
|
||||||
version = "1.17.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b"
|
|
||||||
dependencies = [
|
|
||||||
"hermit-abi",
|
|
||||||
"libc",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "num_enum"
|
name = "num_enum"
|
||||||
version = "0.5.11"
|
version = "0.5.11"
|
||||||
@@ -1455,26 +1382,6 @@ dependencies = [
|
|||||||
"vcpkg",
|
"vcpkg",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "opentelemetry"
|
|
||||||
version = "0.13.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "b91cea1dfd50064e52db033179952d18c770cbc5dfefc8eba45d619357ba3914"
|
|
||||||
dependencies = [
|
|
||||||
"async-trait",
|
|
||||||
"dashmap",
|
|
||||||
"fnv",
|
|
||||||
"futures",
|
|
||||||
"js-sys",
|
|
||||||
"lazy_static",
|
|
||||||
"percent-encoding",
|
|
||||||
"pin-project",
|
|
||||||
"rand",
|
|
||||||
"thiserror 1.0.69",
|
|
||||||
"tokio",
|
|
||||||
"tokio-stream",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ordered-float"
|
name = "ordered-float"
|
||||||
version = "3.9.2"
|
version = "3.9.2"
|
||||||
@@ -1515,26 +1422,6 @@ version = "2.3.2"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
|
checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "pin-project"
|
|
||||||
version = "1.1.10"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a"
|
|
||||||
dependencies = [
|
|
||||||
"pin-project-internal",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "pin-project-internal"
|
|
||||||
version = "1.1.10"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro2",
|
|
||||||
"quote",
|
|
||||||
"syn 2.0.114",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pin-project-lite"
|
name = "pin-project-lite"
|
||||||
version = "0.2.16"
|
version = "0.2.16"
|
||||||
@@ -1678,17 +1565,8 @@ checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"aho-corasick",
|
"aho-corasick",
|
||||||
"memchr",
|
"memchr",
|
||||||
"regex-automata 0.4.13",
|
"regex-automata",
|
||||||
"regex-syntax 0.8.8",
|
"regex-syntax",
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "regex-automata"
|
|
||||||
version = "0.1.10"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
|
|
||||||
dependencies = [
|
|
||||||
"regex-syntax 0.6.29",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1699,15 +1577,9 @@ checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"aho-corasick",
|
"aho-corasick",
|
||||||
"memchr",
|
"memchr",
|
||||||
"regex-syntax 0.8.8",
|
"regex-syntax",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "regex-syntax"
|
|
||||||
version = "0.6.29"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex-syntax"
|
name = "regex-syntax"
|
||||||
version = "0.8.8"
|
version = "0.8.8"
|
||||||
@@ -1829,6 +1701,15 @@ version = "1.2.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "secrecy"
|
||||||
|
version = "0.8.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e"
|
||||||
|
dependencies = [
|
||||||
|
"zeroize",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "security-framework"
|
name = "security-framework"
|
||||||
version = "2.11.1"
|
version = "2.11.1"
|
||||||
@@ -1895,17 +1776,6 @@ dependencies = [
|
|||||||
"zmij",
|
"zmij",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "serde_qs"
|
|
||||||
version = "0.10.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "8cac3f1e2ca2fe333923a1ae72caca910b98ed0630bb35ef6f8c8517d6e81afa"
|
|
||||||
dependencies = [
|
|
||||||
"percent-encoding",
|
|
||||||
"serde",
|
|
||||||
"thiserror 1.0.69",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_repr"
|
name = "serde_repr"
|
||||||
version = "0.1.20"
|
version = "0.1.20"
|
||||||
@@ -2148,33 +2018,13 @@ dependencies = [
|
|||||||
"windows-sys 0.61.2",
|
"windows-sys 0.61.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "thiserror"
|
|
||||||
version = "1.0.69"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
|
|
||||||
dependencies = [
|
|
||||||
"thiserror-impl 1.0.69",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thiserror"
|
name = "thiserror"
|
||||||
version = "2.0.18"
|
version = "2.0.18"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
|
checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"thiserror-impl 2.0.18",
|
"thiserror-impl",
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "thiserror-impl"
|
|
||||||
version = "1.0.69"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro2",
|
|
||||||
"quote",
|
|
||||||
"syn 2.0.114",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2414,48 +2264,16 @@ dependencies = [
|
|||||||
"tracing-core",
|
"tracing-core",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tracing-serde"
|
|
||||||
version = "0.1.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1"
|
|
||||||
dependencies = [
|
|
||||||
"serde",
|
|
||||||
"tracing-core",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tracing-subscriber"
|
|
||||||
version = "0.2.25"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71"
|
|
||||||
dependencies = [
|
|
||||||
"ansi_term",
|
|
||||||
"chrono",
|
|
||||||
"lazy_static",
|
|
||||||
"matchers 0.0.1",
|
|
||||||
"parking_lot",
|
|
||||||
"regex",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"sharded-slab",
|
|
||||||
"smallvec",
|
|
||||||
"thread_local",
|
|
||||||
"tracing",
|
|
||||||
"tracing-core",
|
|
||||||
"tracing-serde",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tracing-subscriber"
|
name = "tracing-subscriber"
|
||||||
version = "0.3.22"
|
version = "0.3.22"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e"
|
checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"matchers 0.2.0",
|
"matchers",
|
||||||
"nu-ansi-term",
|
"nu-ansi-term",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"regex-automata 0.4.13",
|
"regex-automata",
|
||||||
"sharded-slab",
|
"sharded-slab",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"thread_local",
|
"thread_local",
|
||||||
@@ -2486,7 +2304,7 @@ version = "0.1.8"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4064ed685c487dbc25bd3f0e9548f2e34bab9d18cefc700f9ec2dba74ba1138e"
|
checksum = "4064ed685c487dbc25bd3f0e9548f2e34bab9d18cefc700f9ec2dba74ba1138e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"thiserror 2.0.18",
|
"thiserror",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -3050,6 +2868,12 @@ dependencies = [
|
|||||||
"synstructure",
|
"synstructure",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "zeroize"
|
||||||
|
version = "1.8.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zerotrie"
|
name = "zerotrie"
|
||||||
version = "0.2.3"
|
version = "0.2.3"
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ tracing-subscriber = { version = "0.3.22", features = ["fmt", "ansi", "time", "e
|
|||||||
serialport = "4.8.1"
|
serialport = "4.8.1"
|
||||||
gethostname = "1.1.0"
|
gethostname = "1.1.0"
|
||||||
bitflags = "2.10.0"
|
bitflags = "2.10.0"
|
||||||
influxdb2 = "0.3.9"
|
influxdb2 = { version = "0.5.2" }
|
||||||
chrono = "0.4.43"
|
chrono = "0.4.43"
|
||||||
serde_with = "3.16.1"
|
serde_with = "3.16.1"
|
||||||
ctrlc = "3.5.1"
|
ctrlc = "3.5.1"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
FROM rust:slim as builder
|
FROM rust:slim AS builder
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y libssl-dev pkg-config
|
RUN apt-get update && apt-get install -y libudev-dev pkg-config
|
||||||
# build deps only first for build cache
|
# build deps only first for build cache
|
||||||
WORKDIR /usr/src
|
WORKDIR /usr/src
|
||||||
RUN USER=root cargo new chimemon
|
RUN USER=root cargo new chimemon
|
||||||
@@ -11,6 +11,7 @@ COPY . .
|
|||||||
RUN cargo build --release
|
RUN cargo build --release
|
||||||
|
|
||||||
FROM debian:bullseye-slim
|
FROM debian:bullseye-slim
|
||||||
|
RUN apt-get update && apt-get install -y libudev
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=builder /usr/src/chimemon/target/release/chimemon chimemon
|
COPY --from=builder /usr/src/chimemon/target/release/chimemon chimemon
|
||||||
CMD ["/app/chimemon"]
|
CMD ["/app/chimemon"]
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ use figment::{
|
|||||||
providers::{Format, Toml},
|
providers::{Format, Toml},
|
||||||
};
|
};
|
||||||
use futures::future::join_all;
|
use futures::future::join_all;
|
||||||
use std::path::Path;
|
|
||||||
use tokio::{select, sync::broadcast, task::JoinHandle};
|
use tokio::{select, sync::broadcast, task::JoinHandle};
|
||||||
use tokio_util::sync::CancellationToken;
|
use tokio_util::sync::CancellationToken;
|
||||||
use tracing::{Instrument, debug, error, info, info_span, warn};
|
use tracing::{Instrument, debug, error, info, info_span, warn};
|
||||||
|
|||||||
@@ -8,21 +8,18 @@ use byteorder::{BigEndian, ReadBytesExt};
|
|||||||
use bytes::{Buf, BytesMut};
|
use bytes::{Buf, BytesMut};
|
||||||
use chrono::{DateTime, Duration, NaiveDateTime, Utc};
|
use chrono::{DateTime, Duration, NaiveDateTime, Utc};
|
||||||
use figment::value::Map;
|
use figment::value::Map;
|
||||||
use futures::future::join;
|
|
||||||
use influxdb2::models::DataPoint;
|
|
||||||
use influxdb2::models::data_point::DataPointBuilder;
|
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use tokio::io::{AsyncBufReadExt, AsyncWriteExt, BufReader, ReadHalf, WriteHalf};
|
use tokio::io::{AsyncBufReadExt, AsyncWriteExt, BufReader, ReadHalf, WriteHalf};
|
||||||
|
use tokio::select;
|
||||||
use tokio::sync::Mutex;
|
use tokio::sync::Mutex;
|
||||||
use tokio::time::sleep;
|
use tokio::time::sleep;
|
||||||
use tokio::{join, select};
|
|
||||||
use tokio_serial::{SerialPort, SerialStream};
|
use tokio_serial::{SerialPort, SerialStream};
|
||||||
use tokio_util::sync::CancellationToken;
|
use tokio_util::sync::CancellationToken;
|
||||||
use tracing::{debug, info, warn};
|
use tracing::{debug, error, info, warn};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
ChimemonMessage, ChimemonSource, ChimemonSourceChannel, SourceMetric, SourceReportDetails,
|
ChimemonMessage, ChimemonSource, ChimemonSourceChannel, SourceMetric, SourceReport,
|
||||||
TimeReport, UCCMConfig,
|
SourceReportDetails, SourceStatus, TimeReport, UCCMConfig,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const GPS_EPOCH: i64 = 315964800; // Doesn't seem possible to have a const DateTime object
|
pub const GPS_EPOCH: i64 = 315964800; // Doesn't seem possible to have a const DateTime object
|
||||||
@@ -121,46 +118,22 @@ impl SourceReportDetails for UCCMTODReport {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl UCCMTODReport {
|
|
||||||
pub fn as_builder(&self, measurement: &String, tags: &Map<String, String>) -> DataPointBuilder {
|
|
||||||
let mut builder =
|
|
||||||
DataPoint::builder(measurement).timestamp(self.time.timestamp_nanos_opt().unwrap());
|
|
||||||
builder = builder.field("leaps", self.leaps as i64);
|
|
||||||
builder = builder.field("osc_lock", self.flags.contains(UCCMFlags::OSC_LOCK));
|
|
||||||
builder = builder.field("leap_flag", self.flags.contains(UCCMFlags::LEAP_FLAG));
|
|
||||||
builder = builder.field("init_unlock", self.flags.contains(UCCMFlags::INIT_UNLOCK));
|
|
||||||
builder = builder.field("init_no_sats", self.flags.contains(UCCMFlags::INIT_NO_SATS));
|
|
||||||
builder = builder.field(
|
|
||||||
"have_gps_time",
|
|
||||||
self.flags.contains(UCCMFlags::HAVE_GPS_TIME),
|
|
||||||
);
|
|
||||||
builder = builder.field("power_fail", self.flags.contains(UCCMFlags::POWER_FAIL));
|
|
||||||
builder = builder.field("no_gps_sync", self.flags.contains(UCCMFlags::NO_GPS_SYNC));
|
|
||||||
builder = builder.field("no_gps_sync2", self.flags.contains(UCCMFlags::NO_GPS_SYNC2));
|
|
||||||
builder = builder.field("ant_fault", self.flags.contains(UCCMFlags::NO_ANT));
|
|
||||||
builder = builder.field("gps_los", self.flags.contains(UCCMFlags::GPS_LOS));
|
|
||||||
|
|
||||||
builder = tags
|
|
||||||
.iter()
|
|
||||||
.fold(builder, |builder, (k, v)| builder.tag(k, v));
|
|
||||||
|
|
||||||
builder
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct UCCMLoopDiagReport {
|
pub struct UCCMLoopDiagReport {
|
||||||
pub ocxo: f32,
|
pub ocxo: f32,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl UCCMLoopDiagReport {
|
impl SourceReportDetails for UCCMLoopDiagReport {
|
||||||
pub fn as_builder(&self, measurement: &String, tags: &Map<String, String>) -> DataPointBuilder {
|
fn is_healthy(&self) -> bool {
|
||||||
let mut builder = DataPoint::builder(measurement);
|
true
|
||||||
builder = builder.field("ocxo_offset", self.ocxo as f64);
|
}
|
||||||
builder = tags
|
fn to_metrics(&self) -> Vec<SourceMetric> {
|
||||||
.iter()
|
let tags = Arc::new(vec![]);
|
||||||
.fold(builder, |builder, (k, v)| builder.tag(k, v));
|
vec![SourceMetric::new_float(
|
||||||
builder
|
"ocxo_offset",
|
||||||
|
self.ocxo as f64,
|
||||||
|
tags,
|
||||||
|
)]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,16 +143,13 @@ pub struct UCCMGpsSvTracking {
|
|||||||
pub cno: u8,
|
pub cno: u8,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl UCCMGpsSvTracking {
|
impl From<&UCCMGpsSvTracking> for SourceMetric {
|
||||||
fn as_builder(&self, measurement: &String, tags: &Map<String, String>) -> DataPointBuilder {
|
fn from(value: &UCCMGpsSvTracking) -> Self {
|
||||||
let mut builder = DataPoint::builder(measurement)
|
SourceMetric::new_int(
|
||||||
.field("sv_cno", self.cno as i64)
|
"sv_cno",
|
||||||
.tag("sv_id", self.sv.to_string());
|
value.cno as i64,
|
||||||
builder = tags
|
Arc::new(vec![("sv_id", value.sv.to_string())]),
|
||||||
.iter()
|
)
|
||||||
.fold(builder, |builder, (k, v)| builder.tag(k, v));
|
|
||||||
|
|
||||||
builder
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -188,13 +158,12 @@ pub struct UCCMGPSSatsReport {
|
|||||||
pub tracked_svs: Vec<UCCMGpsSvTracking>,
|
pub tracked_svs: Vec<UCCMGpsSvTracking>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl UCCMGPSSatsReport {
|
impl SourceReportDetails for UCCMGPSSatsReport {
|
||||||
pub fn build(&self, measurement: &String, tags: &Map<String, String>) -> Vec<DataPoint> {
|
fn is_healthy(&self) -> bool {
|
||||||
self.tracked_svs
|
self.tracked_svs.len() >= 4
|
||||||
.iter()
|
}
|
||||||
.map(|sv| sv.as_builder(measurement, tags))
|
fn to_metrics(&self) -> Vec<SourceMetric> {
|
||||||
.map(|b| b.build().unwrap())
|
self.tracked_svs.iter().map(|sv| sv.into()).collect()
|
||||||
.collect()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -458,8 +427,8 @@ impl UCCMMonitor {
|
|||||||
state: Arc<Mutex<UCCMMonitorParseState>>,
|
state: Arc<Mutex<UCCMMonitorParseState>>,
|
||||||
) {
|
) {
|
||||||
let mut rdbuf = BytesMut::with_capacity(1024);
|
let mut rdbuf = BytesMut::with_capacity(1024);
|
||||||
let mut last_loop_diag: Option<UCCMLoopDiagReport> = None;
|
let mut last_loop_diag: Option<Arc<UCCMLoopDiagReport>> = None;
|
||||||
let mut last_gps_sats: Option<UCCMGPSSatsReport> = None;
|
let mut last_gps_sats: Option<Arc<UCCMGPSSatsReport>> = None;
|
||||||
|
|
||||||
let mut last_sent_report = Utc::now() - self.config.status_interval;
|
let mut last_sent_report = Utc::now() - self.config.status_interval;
|
||||||
|
|
||||||
@@ -507,31 +476,29 @@ impl UCCMMonitor {
|
|||||||
if sysnow - last_sent_report
|
if sysnow - last_sent_report
|
||||||
>= Duration::from_std(self.config.status_interval).unwrap()
|
>= Duration::from_std(self.config.status_interval).unwrap()
|
||||||
{
|
{
|
||||||
// let mut points = vec![
|
if let Some(loop_diag) = &last_loop_diag {
|
||||||
// tod.as_builder(&self.config.measurement, &self.config.tags)
|
if let Err(e) =
|
||||||
// .build()
|
chan.send(ChimemonMessage::SourceReport(SourceReport {
|
||||||
// .unwrap(),
|
name: "uccm".to_owned(),
|
||||||
// ];
|
status: SourceStatus::Unknown,
|
||||||
// if let Some(loop_diag) = &last_loop_diag {
|
details: loop_diag.clone(),
|
||||||
// points.push(
|
}))
|
||||||
// loop_diag
|
{
|
||||||
// .as_builder(
|
error!(error = ?e, "Unable to send message to channel");
|
||||||
// &self.config.measurement,
|
}
|
||||||
// &self.config.influxdb.tags,
|
}
|
||||||
// )
|
if let Some(gps_sats) = &last_gps_sats {
|
||||||
// .build()
|
if let Err(e) =
|
||||||
// .unwrap(),
|
chan.send(ChimemonMessage::SourceReport(SourceReport {
|
||||||
// )
|
name: "uccm".to_owned(),
|
||||||
// }
|
status: SourceStatus::Unknown,
|
||||||
// if let Some(gps_sats) = &last_gps_sats {
|
details: gps_sats.clone(),
|
||||||
// points.extend(gps_sats.build(
|
}))
|
||||||
// &self.config.sources.uccm.measurement,
|
{
|
||||||
// &self.config.influxdb.tags,
|
error!(error = ?e, "Unable to send message to channel");
|
||||||
// ));
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
// chan.send(ChimemonMessage::DataPoints(points))
|
|
||||||
// .expect("Unable to send to channel");
|
|
||||||
last_sent_report = sysnow;
|
last_sent_report = sysnow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -545,7 +512,7 @@ impl UCCMMonitor {
|
|||||||
let loop_report = UCCMLoopDiagReport::try_from(loop_diag_resp.as_str());
|
let loop_report = UCCMLoopDiagReport::try_from(loop_diag_resp.as_str());
|
||||||
let gps_report = UCCMGPSSatsReport::try_from(gps_sats_resp.as_str());
|
let gps_report = UCCMGPSSatsReport::try_from(gps_sats_resp.as_str());
|
||||||
if let Ok(loop_report) = loop_report {
|
if let Ok(loop_report) = loop_report {
|
||||||
last_loop_diag = Some(loop_report)
|
last_loop_diag = Some(Arc::new(loop_report))
|
||||||
} else {
|
} else {
|
||||||
warn!(
|
warn!(
|
||||||
"Unable to parse loop diag report `{}`: {}",
|
"Unable to parse loop diag report `{}`: {}",
|
||||||
@@ -554,7 +521,7 @@ impl UCCMMonitor {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
if let Ok(gps_report) = gps_report {
|
if let Ok(gps_report) = gps_report {
|
||||||
last_gps_sats = Some(gps_report)
|
last_gps_sats = Some(Arc::new(gps_report))
|
||||||
} else {
|
} else {
|
||||||
warn!(
|
warn!(
|
||||||
"Unable to parse GPS sats report `{}`: {}",
|
"Unable to parse GPS sats report `{}`: {}",
|
||||||
@@ -629,7 +596,5 @@ impl ChimemonSource for UCCMMonitor {
|
|||||||
_ = cancel.cancelled() => { return },
|
_ = cancel.cancelled() => { return },
|
||||||
_ = rx_handle => { return }
|
_ = rx_handle => { return }
|
||||||
};
|
};
|
||||||
|
|
||||||
join!(rx_handle).0.unwrap();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user