pub struct RealBackend { /* private fields */ }Expand description
Real AWS backend that calls aws-sdk-lambda durable execution APIs.
Implements DurableBackend with exponential backoff retry for transient
AWS failures (throttling, server errors, timeouts).
§Examples
use aws_sdk_lambda::Client;
use durable_lambda_core::backend::RealBackend;
let config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await;
let client = Client::new(&config);
let backend = RealBackend::new(client);Implementations§
Source§impl RealBackend
impl RealBackend
Sourcepub fn new(client: Client) -> Self
pub fn new(client: Client) -> Self
Create a new RealBackend wrapping an aws-sdk-lambda client.
§Examples
use aws_sdk_lambda::Client;
use durable_lambda_core::backend::RealBackend;
let config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await;
let client = Client::new(&config);
let backend = RealBackend::new(client);Trait Implementations§
Source§impl DurableBackend for RealBackend
impl DurableBackend for RealBackend
Source§fn checkpoint<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
arn: &'life1 str,
checkpoint_token: &'life2 str,
updates: Vec<OperationUpdate>,
client_token: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<CheckpointDurableExecutionOutput, DurableError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn checkpoint<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
arn: &'life1 str,
checkpoint_token: &'life2 str,
updates: Vec<OperationUpdate>,
client_token: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<CheckpointDurableExecutionOutput, DurableError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Persist checkpoint updates for a durable execution. Read more
Source§fn get_execution_state<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
arn: &'life1 str,
checkpoint_token: &'life2 str,
next_marker: &'life3 str,
max_items: i32,
) -> Pin<Box<dyn Future<Output = Result<GetDurableExecutionStateOutput, DurableError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn get_execution_state<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
arn: &'life1 str,
checkpoint_token: &'life2 str,
next_marker: &'life3 str,
max_items: i32,
) -> Pin<Box<dyn Future<Output = Result<GetDurableExecutionStateOutput, DurableError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Get the current operation state of a durable execution (paginated). Read more
Source§fn batch_checkpoint<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
arn: &'life1 str,
checkpoint_token: &'life2 str,
updates: Vec<OperationUpdate>,
client_token: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<CheckpointDurableExecutionOutput, DurableError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn batch_checkpoint<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
arn: &'life1 str,
checkpoint_token: &'life2 str,
updates: Vec<OperationUpdate>,
client_token: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<CheckpointDurableExecutionOutput, DurableError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Persist multiple checkpoint updates in a single AWS API call. Read more
Auto Trait Implementations§
impl Freeze for RealBackend
impl !RefUnwindSafe for RealBackend
impl Send for RealBackend
impl Sync for RealBackend
impl Unpin for RealBackend
impl UnsafeUnpin for RealBackend
impl !UnwindSafe for RealBackend
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.