feat(mod): add response
This commit is contained in:
14
Cargo.toml
14
Cargo.toml
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "common-telemetry"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
edition = "2024"
|
||||
description = "Microservice infrastructure library"
|
||||
|
||||
@@ -10,7 +10,7 @@ publish = ["kellnr"]
|
||||
# 默认开启所有功能
|
||||
default = ["full"]
|
||||
full = [
|
||||
"error",
|
||||
"response",
|
||||
"telemetry",
|
||||
"with-sqlx",
|
||||
"with-redis",
|
||||
@@ -18,9 +18,11 @@ full = [
|
||||
"with-validator",
|
||||
]
|
||||
|
||||
# --- Error 模块依赖 ---
|
||||
# 开启 error feature 将引入 thiserror, axum, serde
|
||||
error = ["dep:thiserror", "dep:axum", "dep:serde", "dep:serde_json"]
|
||||
# --- Response 模块依赖 ---
|
||||
# 开启 response feature 将引入 thiserror, axum, serde
|
||||
response = ["dep:thiserror", "dep:axum", "dep:serde", "dep:serde_json"]
|
||||
|
||||
error = ["response"]
|
||||
|
||||
# --- Telemetry 模块依赖 ---
|
||||
# 开启 telemetry feature 将引入 tracing 全家桶
|
||||
@@ -34,7 +36,7 @@ with-anyhow = ["dep:anyhow"]
|
||||
with-validator = ["dep:validator"]
|
||||
|
||||
[dependencies]
|
||||
# Error 相关
|
||||
# Response 相关
|
||||
thiserror = { version = "2.0.18", optional = true }
|
||||
axum = { version = "0.8.8", optional = true }
|
||||
serde = { version = "1.0", features = ["derive"], optional = true }
|
||||
|
||||
Reference in New Issue
Block a user