pub struct Namespace {
pub name: String,
pub explode_budget_bytes: Option<u64>,
pub public: bool,
pub events_public: bool,
}Expand description
A tenant. First-class from day one (multi-tenancy), because adding it later would mean migrating every stored path and every grant.
Fields§
§name: StringThe name, possibly nested (team/sub).
explode_budget_bytes: Option<u64>The exploded read cache this account’s repositories may hold, in bytes — the quota, and the one number a plan is allowed to move.
None is “take the server’s default”, which is
min(10 % of /data, 8 GiB) per repository. Some(0) is unlimited and
is a deliberate answer, not an absent one — which is why this is an
Option and not a u64 with a magic value.
What it buys, and what it does not: a bigger cache means more objects are already inflated, so reads are FAST; a smaller one means more reads re-inflate their own delta chain out of the pack (~0.5–2 ms an object), which is SLOW. It is never a refusal and never an error — an account at its budget serves every object it has, correctly, more slowly. Nothing in this field can lose data: every byte it bounds is re-derivable from the packs, which are not bounded by it.
serde(default) so a control document written before the quota field loads
unchanged and every existing namespace reads as “the default”.
public: boolThe namespace is public — an explicit setting of the account admin’s (owner, 2026-10-03: “default for all accounts is that emitted events and namespaces are not public, such things has to be set”).
Private (false, the default) is what every namespace is until its
account admin says otherwise: somebody outside the account learns of it
only through a public repository in it, and a private namespace holding
no public repository answers exactly as one that does not exist. Public:
the namespace itself is shown to everyone, even while it holds no public
repository. Either way a PRIVATE repository in it is never shown to an
outsider — that is the repository’s own visibility.
Skipped when false, so a default namespace’s stored row is byte for
byte what it was before the field existed, and every older row reads as
private.
events_public: boolThe account’s emitted events are public — the account admin’s
explicit setting, false by default: until it is set, the events of an
account are shown to nobody outside it. Skipped when false, as
Namespace::public.