Skip to main content

GateActuator

Trait GateActuator 

Source
pub trait GateActuator: Send + Sync {
    // Required methods
    fn pause(&self);
    fn resume(&self);
}
Available on crate feature governor only.
Expand description

Drives the inbound source on pause/resume edges.

Implementors translate a gate edge into a concrete action on the ingest side – e.g. stop polling a Kafka consumer, stop accepting on an HTTP listener. The gate guarantees each method fires EXACTLY ONCE per transition, so an implementation is free to be non-idempotent (toggle a flag, pause/resume a stream) without double-pausing.

Required Methods§

Source

fn pause(&self)

Pause the inbound source. Called once on the rising edge.

Source

fn resume(&self)

Resume the inbound source. Called once on the falling edge.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§