wip(#4006): per-hive wanted-state buckets — client crate only
CHECKPOINT, NOT A PROPOSAL. mara paused the plan ("i dont quite understand
the plan") before any behaviour-changing edit; this commit exists so the work
survives a container stop, not because it is ready.
wanted.rs: BUCKET -> BUCKET_PREFIX + bucket(hive) producing hive-wanted-<hive>;
open_or_create/open_read_only take the hive. lib.rs: Error::CreateBucket.bucket
becomes String, since a per-hive name is built at runtime.
Nothing else is touched, so no caller compiles against the new signatures yet
and no deployed behaviour changes. Remaining, if she approves: the two other
CreateBucket sites, swarm-controller's OnceCell (one store -> N), hive-c0re's
pull, policy.rs per-hive streams + the reader roster, swarm-nats.nix.
This commit is contained in:
parent
d7c171b805
commit
8c94e340b8
2 changed files with 66 additions and 17 deletions
|
|
@ -111,7 +111,9 @@ pub enum Error {
|
|||
#[cfg(feature = "kv")]
|
||||
#[error("creating the {bucket} bucket")]
|
||||
CreateBucket {
|
||||
bucket: &'static str,
|
||||
// `String` rather than `&'static str`: a per-hive bucket name is built
|
||||
// at runtime (`wanted::bucket`), so the error has to own it.
|
||||
bucket: String,
|
||||
#[source]
|
||||
source: async_nats::jetstream::context::CreateKeyValueError,
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue