-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(repo): Added web-utils crate and added telemetry to all svc (#373)
- Loading branch information
1 parent
5cc0c08
commit 7e3c343
Showing
47 changed files
with
1,250 additions
and
453 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
[package] | ||
name = "fuel-web-utils" | ||
description = "Fuel library for web utils" | ||
authors = { workspace = true } | ||
keywords = { workspace = true } | ||
edition = { workspace = true } | ||
homepage = { workspace = true } | ||
license = { workspace = true } | ||
repository = { workspace = true } | ||
version = { workspace = true } | ||
rust-version = { workspace = true } | ||
|
||
[dependencies] | ||
actix-cors = { workspace = true } | ||
actix-server = { workspace = true } | ||
actix-service = "2.0.2" | ||
actix-web = { workspace = true } | ||
anyhow = { workspace = true } | ||
async-trait = { workspace = true } | ||
chrono = { workspace = true } | ||
derive_more = { version = "1.0", features = ["full"] } | ||
displaydoc = { workspace = true } | ||
dotenvy = { workspace = true } | ||
elasticsearch = "8.15.0-alpha.1" | ||
fuel-data-parser = { workspace = true } | ||
fuel-streams-nats = { workspace = true, features = ["test-helpers"] } | ||
futures = { workspace = true } | ||
futures-util = { workspace = true } | ||
jsonwebtoken = "9.3.0" | ||
num_cpus = { workspace = true } | ||
parking_lot = { version = "0.12", features = ["serde"] } | ||
prometheus = { version = "0.13", features = ["process"] } | ||
rand = { workspace = true } | ||
rust_decimal = { version = "1.13" } | ||
serde = { workspace = true } | ||
serde_json = { workspace = true } | ||
serde_prometheus = { version = "0.2" } | ||
sysinfo = { version = "0.29" } | ||
thiserror = "2.0" | ||
time = { version = "0.3", features = ["serde"] } | ||
tokio = { workspace = true } | ||
tokio-util = "0.7.13" | ||
tracing = { workspace = true } | ||
tracing-actix-web = { workspace = true } | ||
url = "2.5" | ||
urlencoding = "2.1" | ||
uuid = { version = "1.11.0", features = ["serde", "v4"] } | ||
|
||
# in an individual package Cargo.toml | ||
[package.metadata.cargo-machete] | ||
ignored = ["fuel-data-parser"] | ||
|
||
[features] | ||
default = [] | ||
test-helpers = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
pub mod server; | ||
pub mod shutdown; | ||
pub mod telemetry; | ||
|
||
use std::sync::LazyLock; | ||
|
||
pub static MAX_WORKERS: LazyLock<usize> = LazyLock::new(|| { | ||
let available_cpus = num_cpus::get(); | ||
let default_threads = 2 * available_cpus; | ||
|
||
dotenvy::var("MAX_WORKERS") | ||
.ok() | ||
.and_then(|val| val.parse().ok()) | ||
.unwrap_or(default_threads) | ||
}); |
Oops, something went wrong.