pub struct ValidationStage {
pub validator: Option<Arc<Validator>>,
pub cert_fetcher: Option<Arc<CertFetcher>>,
/* private fields */
}Expand description
Validates Data packet signatures before caching.
Sits between PitMatchStage and CsInsertStage in the data pipeline.
When no validator is configured, packets pass through unconditionally.
When a certificate is not yet cached, the packet is queued in a bounded pending queue. A background drain task periodically re-validates queued packets as certificates arrive.
Fields§
§validator: Option<Arc<Validator>>§cert_fetcher: Option<Arc<CertFetcher>>Implementations§
Source§impl ValidationStage
impl ValidationStage
pub fn new( validator: Option<Arc<Validator>>, cert_fetcher: Option<Arc<CertFetcher>>, config: PendingQueueConfig, ) -> Self
pub async fn process(&self, ctx: PacketContext) -> Action
Sourcepub async fn drain_pending(&self) -> Vec<Action>
pub async fn drain_pending(&self) -> Vec<Action>
Drain the pending queue and re-validate packets whose certs arrived.
Called periodically by the drain task spawned in the dispatcher. Returns actions to inject back into the data pipeline.
Auto Trait Implementations§
impl Freeze for ValidationStage
impl !RefUnwindSafe for ValidationStage
impl Send for ValidationStage
impl Sync for ValidationStage
impl Unpin for ValidationStage
impl !UnwindSafe for ValidationStage
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