Skip to main content

DeliveryObserver

Trait DeliveryObserver 

Source
pub trait DeliveryObserver: Send + Sync {
    // Required methods
    fn spawned(
        &self,
        module: &str,
        spawned_at: Instant,
        register_timeout: Duration,
        first_health_budget: Duration,
    ) -> Result<Option<DeliverySpawn>, GateError>;
    fn registered(
        &self,
        connection: ConnectionId,
        spawn: &DeliverySpawn,
    ) -> Result<(), GateError>;
    fn health_probe(
        &self,
        connection: ConnectionId,
        module: &str,
    ) -> Result<Option<DeliveryProbe>, GateError>;
    fn health_result(
        &self,
        probe: DeliveryProbe,
        healthy: bool,
    ) -> Result<Option<AppliedDisposition>, GateError>;
    fn promoted(
        &self,
        connection: ConnectionId,
        module: &str,
        cutover_at: Instant,
    ) -> Result<Option<(u64, u64)>, GateError>;
    fn retry_anchor(&self) -> Result<Option<Instant>, GateError>;
}
Expand description

Supervisor callbacks for the configuration delivery lifecycle. The caller supplies observed process events, never a module’s claimed readiness. Target checks and promotion callbacks run under RuntimeOwner::module_gate across forwarding and registry changes. The spawn token binds a later registration to the approved generation and its original warm-up deadline.

Required Methods§

Source

fn spawned( &self, module: &str, spawned_at: Instant, register_timeout: Duration, first_health_budget: Duration, ) -> Result<Option<DeliverySpawn>, GateError>

Source

fn registered( &self, connection: ConnectionId, spawn: &DeliverySpawn, ) -> Result<(), GateError>

Source

fn health_probe( &self, connection: ConnectionId, module: &str, ) -> Result<Option<DeliveryProbe>, GateError>

Source

fn health_result( &self, probe: DeliveryProbe, healthy: bool, ) -> Result<Option<AppliedDisposition>, GateError>

Source

fn promoted( &self, connection: ConnectionId, module: &str, cutover_at: Instant, ) -> Result<Option<(u64, u64)>, GateError>

Source

fn retry_anchor(&self) -> Result<Option<Instant>, GateError>

Retry only the retained, non-interactive backend when its backoff is due. None means there is no pending anchor and no timer should be armed.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§