pub trait NamespaceShardResolver: Send + Sync {
// Required method
fn shard_for_namespace(&self, name: &str) -> usize;
}Expand description
Which distribution shard a namespace’s registry record lives on.
Implemented by the distributed store; a narrow trait so the routing decision is unit-testable without standing up a cluster.
Required Methods§
Sourcefn shard_for_namespace(&self, name: &str) -> usize
fn shard_for_namespace(&self, name: &str) -> usize
The registry shard name’s record hashes to.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl NamespaceShardResolver for HaematiteStore
The production namespace-shard resolver: the distributed haematite store
hashes the registry key itself.
impl NamespaceShardResolver for HaematiteStore
The production namespace-shard resolver: the distributed haematite store hashes the registry key itself.