bump all dependencies
This commit is contained in:
parent
e79034a44d
commit
f794c18396
1116
Cargo.lock
generated
1116
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
18
Cargo.toml
18
Cargo.toml
|
@ -12,28 +12,28 @@ members = [
|
|||
"libs/shared/",
|
||||
"libs/leash/"
|
||||
]
|
||||
|
||||
resolver = "2"
|
||||
[workspace.dependencies]
|
||||
shared = { path = "libs/shared" }
|
||||
proto = { path = "libs/proto" }
|
||||
leash = { path = "libs/leash" }
|
||||
|
||||
tokio = { version = "1", features = ["rt-multi-thread"] }
|
||||
tokio = { version = "1", features = ["rt-multi-thread", "signal"] }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
hyper = "0.14.23"
|
||||
hyper = "0.14.27"
|
||||
|
||||
anyhow = "1"
|
||||
|
||||
tracing = "0.1"
|
||||
tracing-futures = "0.2"
|
||||
tracing-opentelemetry = "0.18"
|
||||
opentelemetry = { version = "0.18", features = ["rt-tokio"] }
|
||||
opentelemetry-http = "0.7"
|
||||
tracing-opentelemetry = "0.19"
|
||||
opentelemetry = { version = "0.19", features = ["rt-tokio"] }
|
||||
opentelemetry-http = "0.8"
|
||||
|
||||
criterion = { version = "0.4", features = ["async_tokio"] }
|
||||
criterion = { version = "0.5", features = ["async_tokio"] }
|
||||
tokio-test = "0.4.2"
|
||||
tracing-test = "0.2.3"
|
||||
tracing-subscriber = "0.3.16"
|
||||
tracing-test = "0.2.4"
|
||||
tracing-subscriber = "0.3.17"
|
||||
test-log = { version = "*", features = ["trace"] }
|
||||
env_logger = "0.10.0"
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
# Nova architecture
|
||||
|
||||
The nova architecture is composed of multiple components. Each of them is horizontally scale-able.
|
||||
|
||||
```
|
||||
┌──────────────────┐
|
||||
│ │
|
||||
┌─────────────┤ Discord API ├──────────────┐
|
||||
│ │ │ │
|
||||
│ └────────┬─────────┘ │
|
||||
│ │ │
|
||||
│ │ │
|
||||
│ │ │
|
||||
┌─────────┴────────┐ ┌────────┴─────────┐ ┌─────────┴────────┐
|
||||
│ │ │ │ │ │
|
||||
│ Rest Proxy │ │ Gateway client │ │ Webhook Server │
|
||||
│ │ │ │ │ │
|
||||
└─────────┬──┬─────┘ └────────┬─────────┘ └─────────┬────────┘
|
||||
│ │ │ │
|
||||
│ │ │ │
|
||||
│ │ │ │
|
||||
│ │ │ │
|
||||
│ │ │ │
|
||||
│ │ │ │
|
||||
│ └───────┐ │ │
|
||||
┌────────────────┐ ┌────────┴───────┐ │ ┌───────┴────────┐ │
|
||||
│ │ │ │ │ │ ├───────────────┘
|
||||
│ Redis ├───┤ Ratelimit │ │ │ Nats broker │
|
||||
│ │ │ │ │ │ ├──────────────────┐
|
||||
└────────────────┘ └────────────────┘ │ └───────┬────────┘ │
|
||||
│ │ │
|
||||
│ │ │
|
||||
│ ┌───────┴────────┐ ┌──────┴─────┐
|
||||
│ │ │ │ │
|
||||
│ │ Cache manager ├───────────┤ User │
|
||||
│ │ │ │ │
|
||||
│ └────────────────┘ └──────┬─────┘
|
||||
└───────────────────────────────────────┘
|
||||
```
|
||||
|
||||
## Rest Proxy
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
# Building nova
|
||||
|
||||
## Linux
|
||||
|
||||
In order to build nova you need a few tools
|
||||
|
||||
* Rust & Cargo
|
||||
* Go
|
||||
* Protoc
|
||||
*
|
|
@ -1,2 +0,0 @@
|
|||
# 5 Minutes quickstart
|
||||
|
10
exes/cache/Cargo.toml
vendored
10
exes/cache/Cargo.toml
vendored
|
@ -14,13 +14,13 @@ shared = { path = "../../libs/shared" }
|
|||
proto = { path = "../../libs/proto" }
|
||||
|
||||
tokio = { version = "1", features = ["rt"] }
|
||||
tokio-stream = "0.1.11"
|
||||
tokio-stream = "0.1.14"
|
||||
|
||||
serde = { version = "1.0.8", features = ["derive"] }
|
||||
serde = { version = "1.0.166", features = ["derive"] }
|
||||
serde_json = { version = "1.0" }
|
||||
|
||||
async-nats = "0.26.0"
|
||||
twilight-model = "0.14.2"
|
||||
anyhow = "1.0.68"
|
||||
async-nats = "0.29.0"
|
||||
twilight-model = "0.15.2"
|
||||
anyhow = "1.0.71"
|
||||
|
||||
tracing = "0.1.37"
|
|
@ -17,8 +17,8 @@ anyhow = { workspace = true }
|
|||
serde = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
|
||||
tokio-stream = "0.1.11"
|
||||
twilight-gateway = { default-features = false, features = ["rustls-webpki-roots"], version = "0.14.1" }
|
||||
twilight-model = "0.14.2"
|
||||
bytes = "1.3.0"
|
||||
async-nats = "0.26.0"
|
||||
tokio-stream = "0.1.14"
|
||||
twilight-gateway = { default-features = false, features = ["rustls-webpki-roots"], version = "0.15.2" }
|
||||
twilight-model = "0.15.2"
|
||||
bytes = "1.4.0"
|
||||
async-nats = "0.29.0"
|
||||
|
|
|
@ -20,9 +20,8 @@ use shared::{
|
|||
};
|
||||
use std::{convert::TryFrom, future::Future, pin::Pin, str::FromStr};
|
||||
use tokio::{select, sync::oneshot};
|
||||
use tokio_stream::StreamExt;
|
||||
use tracing_opentelemetry::OpenTelemetrySpanExt;
|
||||
use twilight_gateway::{Event, Shard};
|
||||
use twilight_gateway::{Event, Shard, ShardId};
|
||||
pub mod config;
|
||||
use tracing::{debug, error, info, info_span, instrument, Instrument};
|
||||
use twilight_model::gateway::event::DispatchEvent;
|
||||
|
@ -47,25 +46,32 @@ impl Component for GatewayServer {
|
|||
mut stop: oneshot::Receiver<()>,
|
||||
) -> AnyhowResultFuture<()> {
|
||||
Box::pin(async move {
|
||||
let (shard, mut events) = Shard::builder(settings.token.clone(), settings.intents)
|
||||
.shard(settings.shard, settings.shard_total)?
|
||||
.build();
|
||||
let mut shard = Shard::new(
|
||||
ShardId::new(settings.shard, settings.shard_total),
|
||||
settings.token.clone(),
|
||||
settings.intents,
|
||||
);
|
||||
|
||||
let nats = Into::<Pin<Box<dyn Future<Output = anyhow::Result<Client>> + Send>>>::into(
|
||||
settings.nats,
|
||||
)
|
||||
.await?;
|
||||
shard.start().await?;
|
||||
|
||||
loop {
|
||||
select! {
|
||||
event = events.next() => {
|
||||
if let Some(event) = event {
|
||||
let _ = handle_event(event, &nats)
|
||||
.await
|
||||
.map_err(|err| error!(error = ?err, "event publish failed"));
|
||||
} else {
|
||||
break
|
||||
event = shard.next_event() => {
|
||||
match event {
|
||||
Ok(event) => {
|
||||
let _ = handle_event(event, &nats)
|
||||
.await
|
||||
.map_err(|err| error!(error = ?err, "event publish failed"));
|
||||
},
|
||||
Err(source) => {
|
||||
if source.is_fatal() {
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
},
|
||||
_ = (&mut stop) => break
|
||||
|
@ -73,8 +79,6 @@ impl Component for GatewayServer {
|
|||
}
|
||||
|
||||
info!("stopping shard...");
|
||||
shard.shutdown();
|
||||
|
||||
Ok(())
|
||||
})
|
||||
}
|
||||
|
|
|
@ -20,10 +20,10 @@ serde = { workspace = true }
|
|||
serde_json = { workspace = true }
|
||||
hyper = { workspace = true }
|
||||
|
||||
twilight-http-ratelimiting = "0.14.2"
|
||||
tonic = "0.8.3"
|
||||
tokio-stream = "0.1.11"
|
||||
redis = { version = "0.22.1", features = ["cluster", "connection-manager", "tokio-comp"] }
|
||||
twilight-http-ratelimiting = "0.15.1"
|
||||
tonic = "0.9.2"
|
||||
tokio-stream = "0.1.14"
|
||||
redis = { version = "0.23.0", features = ["cluster", "connection-manager", "tokio-comp"] }
|
||||
|
||||
[dev-dependencies]
|
||||
criterion = { workspace = true }
|
||||
|
|
|
@ -20,13 +20,13 @@ serde = { workspace = true }
|
|||
serde_json = { workspace = true }
|
||||
hyper = { workspace = true }
|
||||
|
||||
futures-util = "0.3.17"
|
||||
hyper-rustls = "0.23.2"
|
||||
futures-util = "0.3.28"
|
||||
hyper-rustls = "0.24.1"
|
||||
lazy_static = "1.4.0"
|
||||
xxhash-rust = { version = "0.8.2", features = ["xxh32"] }
|
||||
twilight-http-ratelimiting = "0.14.2"
|
||||
xxhash-rust = { version = "0.8.6", features = ["xxh32"] }
|
||||
twilight-http-ratelimiting = "0.15.1"
|
||||
|
||||
hashring = "0.3.0"
|
||||
tonic = "0.8.3"
|
||||
tokio-stream = "0.1.11"
|
||||
dns-lookup = "1.0.8"
|
||||
tonic = "0.9.2"
|
||||
tokio-stream = "0.1.14"
|
||||
dns-lookup = "2.0.2"
|
||||
|
|
|
@ -18,7 +18,7 @@ use std::{
|
|||
sync::Arc,
|
||||
time::SystemTime,
|
||||
};
|
||||
use tracing::{debug_span, error, info_span, log::trace, Instrument};
|
||||
use tracing::{debug_span, error, info_span, trace, Instrument};
|
||||
use twilight_http_ratelimiting::{Method, Path};
|
||||
|
||||
use crate::{config::ReverseProxy, ratelimit_client::RemoteRatelimiter};
|
||||
|
|
|
@ -16,6 +16,6 @@ anyhow = { workspace = true }
|
|||
|
||||
hex = "0.4.3"
|
||||
ed25519-dalek = "1"
|
||||
twilight-model = "0.14.2"
|
||||
twilight-model = "0.15.2"
|
||||
|
||||
async-nats = "0.26.0"
|
||||
async-nats = "0.29.0"
|
||||
|
|
|
@ -6,7 +6,7 @@ edition = "2021"
|
|||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
libc = "0.2.139"
|
||||
libc = "0.2.147"
|
||||
leash = { path = "../../libs/leash" }
|
||||
shared = { path = "../../libs/shared" }
|
||||
|
||||
|
@ -15,24 +15,24 @@ gateway = { path = "../../exes/gateway" }
|
|||
ratelimit = { path = "../../exes/ratelimit" }
|
||||
rest = { path = "../../exes/rest" }
|
||||
webhook = { path = "../../exes/webhook" }
|
||||
ctrlc = "3.2.4"
|
||||
ctrlc = "3.4.0"
|
||||
|
||||
tokio = { version = "1.24.2", features = ["rt"] }
|
||||
serde = "1.0.152"
|
||||
serde_json = "1.0.91"
|
||||
anyhow = { version = "1.0.68", features = ["backtrace"] }
|
||||
tokio = { version = "1.29.1", features = ["rt"] }
|
||||
serde = "1.0.166"
|
||||
serde_json = "1.0.100"
|
||||
anyhow = { version = "1.0.71", features = ["backtrace"] }
|
||||
|
||||
tracing = "0.1.37"
|
||||
|
||||
config = "0.13.3"
|
||||
|
||||
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
|
||||
tracing-opentelemetry = "0.18.0"
|
||||
opentelemetry = { version ="0.18.0", features = ["rt-tokio"] }
|
||||
opentelemetry-otlp = { version = "0.11.0" }
|
||||
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
|
||||
tracing-opentelemetry = "0.19.0"
|
||||
opentelemetry = { version ="0.19.0", features = ["rt-tokio"] }
|
||||
opentelemetry-otlp = { version = "0.12.0" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["staticlib", "rlib"]
|
||||
|
||||
[build-dependencies]
|
||||
cbindgen = "0.24.3"
|
||||
cbindgen = "0.24.5"
|
||||
|
|
|
@ -11,7 +11,7 @@ use tokio::{
|
|||
};
|
||||
use tracing::{
|
||||
debug,
|
||||
log::{error, info},
|
||||
error, info,
|
||||
};
|
||||
|
||||
/// Represents a all in one instance
|
||||
|
|
|
@ -15,5 +15,5 @@ tracing-opentelemetry = { workspace = true }
|
|||
tracing = { workspace = true }
|
||||
|
||||
tracing-log = { version = "0.1.3", features = ["env_logger"] }
|
||||
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
|
||||
opentelemetry-otlp = { version = "0.11.0", features = ["metrics"] }
|
||||
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
|
||||
opentelemetry-otlp = { version = "0.12.0", features = ["metrics"] }
|
||||
|
|
|
@ -24,8 +24,7 @@ use std::str::FromStr;
|
|||
use std::time::Duration;
|
||||
use std::{future::Future, pin::Pin};
|
||||
use tokio::sync::oneshot;
|
||||
use tracing::log::error;
|
||||
use tracing::{info, log::trace};
|
||||
use tracing::{info, trace, error};
|
||||
use tracing_subscriber::filter::Directive;
|
||||
use tracing_subscriber::{fmt, prelude::*, EnvFilter};
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
[package]
|
||||
name = "proto"
|
||||
version = "0.1.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
tonic = "0.8.3"
|
||||
prost = "0.11.5"
|
||||
tonic = "0.9.2"
|
||||
prost = "0.11.9"
|
||||
|
||||
[build-dependencies]
|
||||
tonic-build = "0.8.4"
|
||||
glob = "0.3.0"
|
||||
tonic-build = "0.9.2"
|
||||
glob = "0.3.1"
|
||||
|
|
|
@ -11,9 +11,9 @@ tracing = { workspace = true }
|
|||
tokio = { workspace = true }
|
||||
|
||||
config = { version = "0.13", default-features = false, features = ["json", "yaml-rust", "ini"] }
|
||||
redis = { version = "0.22.1", features = ["cluster", "connection-manager", "tokio-comp"] }
|
||||
redis = { version = "0.23.0", features = ["cluster", "connection-manager", "tokio-comp"] }
|
||||
|
||||
async-nats = "0.26.0"
|
||||
twilight-model = "0.14.2"
|
||||
anyhow = "1.0.68"
|
||||
opentelemetry-otlp = "0.11.0"
|
||||
async-nats = "0.29.0"
|
||||
twilight-model = "0.15.2"
|
||||
anyhow = "1.0.71"
|
||||
opentelemetry-otlp = "0.12.0"
|
||||
|
|
Loading…
Reference in a new issue