Skip to main content

Crate atomr_cluster_sharding

Crate atomr_cluster_sharding 

Source
Expand description

atomr-cluster-sharding.

Structs§

CoordinatorState
Eventsourced coordinator state — kept separate from ShardCoordinator so callers can rebuild it from journal replay. The in-memory ShardCoordinator is the local projection; this struct mirrors it through the persistence layer.
DDataShardCoordinator
DData-backed allocation coordinator.
EntityRef
HandoffCoordinator
Per-shard handoff state machine.
InMemoryRememberStore
In-memory store — for tests and as a reference implementation.
LeastShardAllocationStrategy
Place new shards on the region with the fewest shards, breaking ties lexicographically. Rebalances if the difference between most- and least-loaded regions exceeds rebalance_threshold.
PassivationTracker
PersistentShardCoordinator
Wraps a ShardCoordinator with Eventsourced plumbing. Use recover on boot, then command for every allocation / rebalance / removal.
PinnedAllocationStrategy
Pin every shard to a specific region (useful for tests / static allocation). analog: a custom strategy returning a constant region.
RebalanceRunner
RememberedEntities
In-process registry of remembered entity ids. Wraps a RememberEntitiesStore and serves quick lookups from a local snapshot.
Shard
ShardCoordinator
ShardRegion

Enums§

CoordinatorCommand
CoordinatorError
CoordinatorEvent
HandoffError
HandoffState
RebalanceAction
Action emitted by RebalanceRunner::step.
RememberError

Traits§

MessageExtractor
RememberEntitiesStore
Pluggable persistence store for remembered entities.
ShardAllocationStrategy
Pluggable shard allocation policy.

Functions§

project_into
Project a CoordinatorState (rebuilt from journal replay) onto a fresh ShardCoordinator. Useful right after recover.