Expand description
Unified event system for progress reporting and observability.
This module provides a unified event system that wraps all event categories used throughout void-core. It enables consistent progress reporting and observability across different subsystems.
§Event Categories
PipelineEvent- seal/unseal operationsWorkspaceEvent- stage/checkout operationsOpsEvent- fsck/merge operationsP2PEvent- networking operations
§Usage
ⓘ
use void_core::support::events::{VoidEvent, VoidObserver, emit};
struct MyObserver;
impl VoidObserver for MyObserver {
fn on_event(&self, event: &VoidEvent) {
println!("Event: {:?}", event);
}
}Structs§
- Legacy
Pipeline Adapter - Adapter for legacy PipelineObserver compatibility.
- Multi
Observer - Observer that forwards events to multiple child observers.
- Null
Observer - No-op observer that discards all events.
Enums§
- Fetch
Source - Source from which a shard was fetched.
- Issue
Severity - Severity level for issues found during fsck.
- OpsEvent
- Events emitted during ops operations (fsck/merge).
- P2PEvent
- Events emitted during P2P networking operations.
- Pipeline
Event - Events emitted during pipeline operations (seal/unseal).
- Void
Event - Unified event type wrapping all event categories.
- Workspace
Event - Events emitted during workspace operations (stage/checkout).
Traits§
- Void
Observer - Observer trait for receiving void events.
Functions§
- emit
- Emit a void event to an optional observer.
- emit_
ops - Emit an ops event to an optional observer.
- emit_
p2p - Emit a P2P event to an optional observer.
- emit_
pipeline - Emit a pipeline event to an optional observer.
- emit_
workspace - Emit a workspace event to an optional observer.