pub struct ShardingConfig {
pub num_shards: u64,
pub allocation_buffer: usize,
pub request_timeout: Duration,
pub command_buffer: usize,
pub role_constraint: Option<String>,
pub agent_role: String,
pub coordinator_tick: Duration,
pub rebalance_per_round: usize,
pub passivation_idle_timeout: Option<Duration>,
pub handoff_drain_delay: Duration,
pub remember_entities: RememberEntitiesConfig,
}Expand description
Configuration for one sharding region.
Fields§
§num_shards: u64Default shard count used by DefaultShardExtractor.
allocation_buffer: usizeMaximum envelopes buffered per shard while an allocation request is in flight.
request_timeout: DurationBounded wait for coordinator, peer-region, and ask requests.
command_buffer: usizeRegion command queue capacity.
role_constraint: Option<String>Optional role that shard-owning nodes must advertise.
agent_role: StringCluster-agent role used to discover C2-capable peers.
coordinator_tick: DurationCoordinator takeover/rebuild poll interval.
rebalance_per_round: usizeMaximum graceful rebalance moves the coordinator may initiate per round.
Dead-owner reallocations are not capped; this limit applies to coordinator-initiated spread after a node joins.
passivation_idle_timeout: Option<Duration>Optional idle timeout after which a local entity actor is passivated.
The next message for the entity respawns it on demand.
handoff_drain_delay: DurationDelay before a region drains envelopes buffered for a moving shard.
remember_entities: RememberEntitiesConfigRemember-entities store and write-behind policy.
Disabled by default. Entity types must also be registered through
ShardingHandle::register_remembered_entity_type before their ids are
written to or recovered from the store.
Trait Implementations§
Source§impl Clone for ShardingConfig
impl Clone for ShardingConfig
Source§fn clone(&self) -> ShardingConfig
fn clone(&self) -> ShardingConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more