swarm-queue-client: audience-scoped tokens + a blocking mint for a non-reactor caller

This commit is contained in:
damocles 2026-08-26 22:03:23 +02:00 committed by mara
commit e8584e595b
3 changed files with 179 additions and 21 deletions

View file

@ -35,7 +35,16 @@ notices = ["async-nats/jetstream"]
# Bare (no `kv`/`jetstream`) unless a consumer opts into the `kv` feature
# above - the connect itself needs none of them.
async-nats.workspace = true
reqwest.workspace = true
# `blocking` on top of the workspace default (`form`/`json`/`rustls`) —
# `mint_token_for_blocking` needs `reqwest::blocking::Client` for a caller
# with no tokio reactor to `.await` an async request on (an OTLP exporter's
# `HttpClient` impl, see that function's doc). Declared here rather than
# left to arrive transitively from a consumer that happens to pull in
# `reqwest`'s blocking feature some other way — this crate already has a
# recorded case of exactly that kind of accidental compile (see the `kv`
# feature's comment above), and `cargo check -p swarm-queue-client` alone
# must not depend on what else is in the build.
reqwest = { workspace = true, features = ["blocking"] }
serde.workspace = true
serde_json.workspace = true
# A library, so its errors are a matchable enum rather than an opaque