pub struct SyncPulse {
pub pulse_id: EventId,
pub tenant_id: TenantId,
pub trigger: SyncTrigger,
pub affected_agents: Vec<AgentId>,
pub drift_meter: Option<DriftMeter>,
pub reconciliation: Option<Reconciliation>,
pub emitted_at: Timestamp,
}Expand description
A synchronization pulse emitted when agents need to reconcile.
Fields§
§pulse_id: EventIdUnique ID for this pulse (correlates with Event DAG entry).
tenant_id: TenantIdTenant this pulse belongs to.
trigger: SyncTriggerWhat triggered this synchronization pulse.
affected_agents: Vec<AgentId>Agents affected by this pulse.
drift_meter: Option<DriftMeter>Optional drift measurement that triggered the pulse.
reconciliation: Option<Reconciliation>Reconciliation result (populated after resolution).
emitted_at: TimestampWhen this pulse was emitted.
Implementations§
Source§impl SyncPulse
impl SyncPulse
Sourcepub fn from_drift(tenant_id: TenantId, drift_meter: DriftMeter) -> Self
pub fn from_drift(tenant_id: TenantId, drift_meter: DriftMeter) -> Self
Create a new SyncPulse from a drift threshold breach.
Sourcepub fn from_conflict(
tenant_id: TenantId,
branch_a: EventId,
branch_b: EventId,
affected_agents: Vec<AgentId>,
) -> Self
pub fn from_conflict( tenant_id: TenantId, branch_a: EventId, branch_b: EventId, affected_agents: Vec<AgentId>, ) -> Self
Create a new SyncPulse from a DAG conflict detection.
Sourcepub fn from_watermark_lag(
tenant_id: TenantId,
lagging_agent: AgentId,
delta: i64,
affected_agents: Vec<AgentId>,
) -> Self
pub fn from_watermark_lag( tenant_id: TenantId, lagging_agent: AgentId, delta: i64, affected_agents: Vec<AgentId>, ) -> Self
Create a new SyncPulse from a watermark lag detection.
Sourcepub fn with_reconciliation(self, reconciliation: Reconciliation) -> Self
pub fn with_reconciliation(self, reconciliation: Reconciliation) -> Self
Attach a reconciliation result to this pulse.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SyncPulse
impl<'de> Deserialize<'de> for SyncPulse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for SyncPulse
Auto Trait Implementations§
impl Freeze for SyncPulse
impl RefUnwindSafe for SyncPulse
impl Send for SyncPulse
impl Sync for SyncPulse
impl Unpin for SyncPulse
impl UnwindSafe for SyncPulse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more