[package] name = "valensas-actuator" version = "0.4.1" edition = "2021" description = "A library that provides Prometheus metrics collection capabilities for Rocket applications." license = "MIT" repository = "https://github.com/Valensas/rust-actuator" [dependencies] async-trait = "0.1.73" rocket = { version = "0.5.0-rc.3", features = ["json"] } log = "0.4.20" # Optional dependencies tonic = { version = "0.10.1", optional = true } tonic-health = { version = "0.10.1", optional = true } prometheus = { version = "0.13.3", optional = true } tower = { version = "0.4.13", optional = true } serde = { version = "1.0.185", optional = true } diesel = { version = "2.1.0", optional = true } futures = { version = "0.3.28", optional = true } r2d2 = { version = "0.8.10", optional = true } tokio = { version = "1.32.0", optional = true } [features] health = ["dep:serde", "dep:futures"] health-tonic = ["health", "dep:tonic", "dep:tonic-health"] health-diesel = ["health", "dep:diesel"] prometheus-rocket = ["dep:prometheus"] prometheus-tonic = ["prometheus-rocket", "dep:tonic", "dep:tower"] prometheus-r2d2 = ["prometheus-rocket", "dep:r2d2"] prometheus-tokio = ["prometheus-rocket", "dep:tokio"] [[example]] name = "health" required-features = ["health", "health-diesel"] [[example]] name = "prometheus" required-features = ["prometheus-rocket"] [[example]] name = "prometheus_tonic" required-features = ["prometheus-rocket", "prometheus-tonic"] [[example]] name = "prometheus_r2d2" required-features = ["prometheus-rocket", "prometheus-r2d2"] [[example]] name = "prometheus_tokio" required-features = ["prometheus-rocket", "prometheus-tokio"] # Dependencies for examples [dev-dependencies] r2d2 = "0.8.10" tokio = "1.32.0" tonic-health = "0.10.1" diesel = { version = "2.1.0", features = ["sqlite", "r2d2"] }