swarm-wire: take notices's wire types, fmt the moved imports
This commit is contained in:
parent
e111807f59
commit
fc72bea151
12 changed files with 72 additions and 86 deletions
|
|
@ -23,12 +23,11 @@ serde.workspace = true
|
|||
serde_json.workspace = true
|
||||
# The jti digest: base32hex(sha256(claims)) over every JWT this crate signs.
|
||||
sha2.workspace = true
|
||||
# For `status::BUCKET` and `notices::STREAM` - the subjects a hive may
|
||||
# publish to are derived from these names, and every end that touches them
|
||||
# must agree on the same one. Deliberately WITHOUT the `kv` feature: this
|
||||
# crate derives subject strings, it never opens the bucket. `notices`
|
||||
# is name-only too (no `jetstream`/`kv` surface), same reason.
|
||||
swarm-queue-client = { workspace = true, features = ["notices"] }
|
||||
# For `status::BUCKET`: the subjects a hive may publish to are derived from
|
||||
# the name, and every end that touches it must agree on the same one.
|
||||
# Deliberately WITHOUT the `kv` feature: this crate derives subject strings,
|
||||
# it never opens the bucket.
|
||||
swarm-queue-client.workspace = true
|
||||
# The store reads: the callout keys, its own OIDC secret, and the agent
|
||||
# credentials `swarm-agent-verify` checks a presented token against.
|
||||
swarm-secret-client.workspace = true
|
||||
|
|
|
|||
|
|
@ -477,10 +477,10 @@ impl Policy {
|
|||
fn notices_subjects() -> [String; 2] {
|
||||
// Unlike `Self::stream()` above, no `KV_` prefix: the notices
|
||||
// stream is a plain `JetStream` stream, not a KV bucket, so its
|
||||
// NATS stream name *is* `swarm_queue_client::notices::STREAM`
|
||||
// NATS stream name *is* `swarm_wire::notices::STREAM`
|
||||
// verbatim — the `KV_` prefix is `create_key_value`'s own
|
||||
// convention, not something every stream carries.
|
||||
let stream = swarm_queue_client::notices::STREAM;
|
||||
let stream = swarm_wire::notices::STREAM;
|
||||
[
|
||||
format!("$JS.API.STREAM.INFO.{stream}"),
|
||||
format!("$JS.API.STREAM.CREATE.{stream}"),
|
||||
|
|
@ -514,7 +514,7 @@ impl Policy {
|
|||
// Named from the defining crate so a rename cannot leave the grant
|
||||
// pointing at a subject nobody publishes to. Not `extra_hive_subjects`:
|
||||
// that is for streams this crate does not know about.
|
||||
subjects.push(swarm_queue_client::notices::subject(hive));
|
||||
subjects.push(swarm_wire::notices::subject(hive));
|
||||
// Reading the wanted-state bucket, which is **this hive's own**.
|
||||
//
|
||||
// One bucket per hive rather than one keyed by hive, so that a *watch*
|
||||
|
|
|
|||
Loading…
Reference in a new issue