Files
noleader/crates/noleader/Cargo.toml
kjuulh b1f43394d6
All checks were successful
continuous-integration/drone/push Build is passing
feat: add features for nats and postgres
2025-09-24 21:36:59 +02:00

40 lines
1.1 KiB
TOML

[package]
name = "noleader"
edition = "2024"
readme = "../../README.md"
version.workspace = true
license.workspace = true
repository = "https://git.front.kjuulh.io/kjuulh/noleader"
authors = ["kjuulh <contact@kasperhermansen.com>"]
description = "A small leader election package using NATS/Postgres keyvalue store as the distributed locking mechanism. Does not require a min / max set of nodes"
[dependencies]
anyhow.workspace = true
tracing.workspace = true
tokio.workspace = true
uuid = { version = "1", features = ["v4", "v7"] }
bytes = "1"
tokio-util = "0.7"
rand = "0.9"
async-trait = "0.1"
async-nats = { version = "0.42", optional = true }
# fork until dangerous set migrate table name is stable. Should be any version after 8.6
sqlx = { git = "https://github.com/launchbadge/sqlx", features = [
"uuid",
"postgres",
"runtime-tokio",
"tls-rustls",
], rev = "064d649abdfd1742e5fdcc20176a6b415b9c25d3", optional = true }
[dev-dependencies]
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
[features]
default = ["nats", "postgres"]
nats = ["dep:async-nats"]
postgres = ["dep:sqlx"]