pub type DefaultConsensusService = ConsensusService<ScopeID, InMemoryConsensusStorage<ScopeID>, BroadcastEventBus<ScopeID>>;Expand description
A ready-to-use service with in-memory storage and broadcast events.
This is the easiest way to get started. It stores everything in memory (great for
testing or single-node setups) and uses a simple broadcast channel for events.
If you need persistence or custom event handling, use ConsensusService directly.
Aliased Type§
pub struct DefaultConsensusService { /* private fields */ }Implementations§
Source§impl DefaultConsensusService
impl DefaultConsensusService
Sourcepub fn new_with_max_sessions(max_sessions_per_scope: usize) -> Self
pub fn new_with_max_sessions(max_sessions_per_scope: usize) -> Self
Create a service with a custom limit on how many sessions can exist per scope.
When the limit is reached, older sessions are automatically removed to make room.