pub struct LambdaScheduledRecoveryHandler { /* private fields */ }Expand description
Handler for scheduled push-recovery ticks.
Construct once per Lambda cold start; invoke per scheduled event.
Implementations§
Source§impl LambdaScheduledRecoveryHandler
impl LambdaScheduledRecoveryHandler
Sourcepub const ERROR_SAMPLE_LIMIT: usize = 8
pub const ERROR_SAMPLE_LIMIT: usize = 8
Cap on errors in a single response so Lambda doesn’t return
megabytes of stringified errors under a persistent outage.
pub fn new( dispatcher: Arc<PushDispatcher>, delivery_store: Arc<dyn A2aPushDeliveryStore>, ) -> Self
pub fn with_config(self, config: LambdaScheduledRecoveryConfig) -> Self
Sourcepub async fn handle_scheduled_event(
&self,
_event: EventBridgeEvent,
) -> LambdaScheduledRecoveryResponse
pub async fn handle_scheduled_event( &self, _event: EventBridgeEvent, ) -> LambdaScheduledRecoveryResponse
Run one recovery sweep. The _event argument is accepted so
the signature matches lambda_runtime::service_fn; the
EventBridge payload is not inspected — each invocation is one
tick regardless of cron metadata.
Sourcepub async fn run_sweep(&self) -> LambdaScheduledRecoveryResponse
pub async fn run_sweep(&self) -> LambdaScheduledRecoveryResponse
Testable entry point. Runs the full sweep and returns a
summary. External callers almost always want
Self::handle_scheduled_event; this method is exposed so
unit tests can exercise the recovery logic without
constructing an EventBridgeEvent.
Trait Implementations§
Source§impl Clone for LambdaScheduledRecoveryHandler
impl Clone for LambdaScheduledRecoveryHandler
Source§fn clone(&self) -> LambdaScheduledRecoveryHandler
fn clone(&self) -> LambdaScheduledRecoveryHandler
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LambdaScheduledRecoveryHandler
impl !RefUnwindSafe for LambdaScheduledRecoveryHandler
impl Send for LambdaScheduledRecoveryHandler
impl Sync for LambdaScheduledRecoveryHandler
impl Unpin for LambdaScheduledRecoveryHandler
impl UnsafeUnpin for LambdaScheduledRecoveryHandler
impl !UnwindSafe for LambdaScheduledRecoveryHandler
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