move signal-gateway binary to its own crate, simplify deps
This commit is contained in:
Generated
+16
-5
@@ -1645,20 +1645,16 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
|||||||
name = "signal-gateway"
|
name = "signal-gateway"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
|
||||||
"chrono",
|
"chrono",
|
||||||
"chrono-tz",
|
"chrono-tz",
|
||||||
"conf",
|
"conf",
|
||||||
"conf-extra",
|
"conf-extra",
|
||||||
"displaydoc",
|
"displaydoc",
|
||||||
"dotenvy",
|
|
||||||
"futures-util",
|
"futures-util",
|
||||||
"http",
|
"http",
|
||||||
"http-body",
|
"http-body",
|
||||||
"http-body-util",
|
"http-body-util",
|
||||||
"humantime",
|
"humantime",
|
||||||
"hyper",
|
|
||||||
"hyper-util",
|
|
||||||
"jsonrpsee",
|
"jsonrpsee",
|
||||||
"prometheus-http-client",
|
"prometheus-http-client",
|
||||||
"rand",
|
"rand",
|
||||||
@@ -1669,11 +1665,26 @@ dependencies = [
|
|||||||
"tokio",
|
"tokio",
|
||||||
"tokio-util",
|
"tokio-util",
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-subscriber",
|
|
||||||
"url",
|
"url",
|
||||||
"walkdir",
|
"walkdir",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "signal-gateway-bin"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"conf",
|
||||||
|
"dotenvy",
|
||||||
|
"hyper",
|
||||||
|
"hyper-util",
|
||||||
|
"signal-gateway",
|
||||||
|
"syslog_rfc5424",
|
||||||
|
"tokio",
|
||||||
|
"tokio-util",
|
||||||
|
"tracing",
|
||||||
|
"tracing-subscriber",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "signal-hook-registry"
|
name = "signal-hook-registry"
|
||||||
version = "1.4.7"
|
version = "1.4.7"
|
||||||
|
|||||||
+2
-2
@@ -3,6 +3,7 @@ resolver = "2"
|
|||||||
members = [
|
members = [
|
||||||
"prometheus-http-client",
|
"prometheus-http-client",
|
||||||
"signal-gateway",
|
"signal-gateway",
|
||||||
|
"signal-gateway-bin",
|
||||||
]
|
]
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
@@ -24,7 +25,6 @@ result_large_err = "allow"
|
|||||||
prometheus-http-client = { path = "prometheus-http-client", default-features = false }
|
prometheus-http-client = { path = "prometheus-http-client", default-features = false }
|
||||||
|
|
||||||
async-trait = "0.1"
|
async-trait = "0.1"
|
||||||
bytes = "1"
|
|
||||||
chrono = { version = "0.4", default-features = false, features = ["clock", "serde", "std"] }
|
chrono = { version = "0.4", default-features = false, features = ["clock", "serde", "std"] }
|
||||||
chrono-tz = "0.10"
|
chrono-tz = "0.10"
|
||||||
conf = "0.4"
|
conf = "0.4"
|
||||||
@@ -46,7 +46,7 @@ serde = { version = "1", features = ["derive"] }
|
|||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
syslog_rfc5424 = "0.10"
|
syslog_rfc5424 = "0.10"
|
||||||
thiserror = "2"
|
thiserror = "2"
|
||||||
tokio = { version = "1", features = ["io-util", "macros", "net", "rt-multi-thread", "signal", "sync", "time"] }
|
tokio = { version = "1", features = ["io-util", "macros", "net", "sync", "time"] }
|
||||||
tokio-util = { version = "0.7", features = ["codec"] }
|
tokio-util = { version = "0.7", features = ["codec"] }
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
[package]
|
||||||
|
name = "signal-gateway-bin"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition.workspace = true
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "signal-gateway"
|
||||||
|
path = "src/main.rs"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = ["signal-gateway/default"]
|
||||||
|
plot = ["signal-gateway/plot"]
|
||||||
|
rustls-tls = ["signal-gateway/rustls-tls"]
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
signal-gateway = { path = "../signal-gateway" }
|
||||||
|
|
||||||
|
conf = { workspace = true }
|
||||||
|
dotenvy = { workspace = true }
|
||||||
|
hyper = { workspace = true }
|
||||||
|
hyper-util = { workspace = true }
|
||||||
|
syslog_rfc5424 = { workspace = true }
|
||||||
|
tokio = { workspace = true, features = ["rt-multi-thread", "signal"] }
|
||||||
|
tokio-util = { workspace = true }
|
||||||
|
tracing = { workspace = true }
|
||||||
|
tracing-subscriber = { workspace = true }
|
||||||
@@ -10,17 +10,10 @@ workspace = true
|
|||||||
default = ["plot"]
|
default = ["plot"]
|
||||||
plot = ["prometheus-http-client/plot", "dep:chrono-tz", "dep:rand", "dep:walkdir"]
|
plot = ["prometheus-http-client/plot", "dep:chrono-tz", "dep:rand", "dep:walkdir"]
|
||||||
rustls-tls = ["prometheus-http-client/rustls-tls"]
|
rustls-tls = ["prometheus-http-client/rustls-tls"]
|
||||||
bin = ["dep:dotenvy", "dep:hyper", "dep:hyper-util", "dep:tracing-subscriber"]
|
|
||||||
|
|
||||||
[[bin]]
|
|
||||||
name = "signal-gateway"
|
|
||||||
path = "src/bin/main.rs"
|
|
||||||
required-features = ["bin"]
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
prometheus-http-client = { workspace = true, default-features = false }
|
prometheus-http-client = { workspace = true, default-features = false }
|
||||||
|
|
||||||
bytes = { workspace = true }
|
|
||||||
chrono = { workspace = true }
|
chrono = { workspace = true }
|
||||||
conf = { workspace = true }
|
conf = { workspace = true }
|
||||||
conf-extra = { workspace = true }
|
conf-extra = { workspace = true }
|
||||||
@@ -40,12 +33,6 @@ tokio-util = { workspace = true }
|
|||||||
tracing = { workspace = true }
|
tracing = { workspace = true }
|
||||||
url = { workspace = true }
|
url = { workspace = true }
|
||||||
|
|
||||||
# Optional dependencies for bin feature
|
|
||||||
dotenvy = { workspace = true, optional = true }
|
|
||||||
hyper = { workspace = true, optional = true }
|
|
||||||
hyper-util = { workspace = true, optional = true }
|
|
||||||
tracing-subscriber = { workspace = true, optional = true }
|
|
||||||
|
|
||||||
# Optional dependencies for plot feature
|
# Optional dependencies for plot feature
|
||||||
chrono-tz = { workspace = true, optional = true }
|
chrono-tz = { workspace = true, optional = true }
|
||||||
rand = { workspace = true, optional = true }
|
rand = { workspace = true, optional = true }
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ use crate::{
|
|||||||
jsonrpc::{Envelope, RpcClient, RpcClientError, SignalMessage, connect_tcp},
|
jsonrpc::{Envelope, RpcClient, RpcClientError, SignalMessage, connect_tcp},
|
||||||
prometheus::{Prometheus, PrometheusConfig},
|
prometheus::{Prometheus, PrometheusConfig},
|
||||||
};
|
};
|
||||||
use bytes::Buf;
|
use tokio_util::bytes::Buf;
|
||||||
use conf::{Conf, Subcommands};
|
use conf::{Conf, Subcommands};
|
||||||
use futures_util::FutureExt;
|
use futures_util::FutureExt;
|
||||||
pub use http::{Method, Request, Response, StatusCode};
|
pub use http::{Method, Request, Response, StatusCode};
|
||||||
|
|||||||
Reference in New Issue
Block a user