Skip to main content

DurableServiceClient

Trait DurableServiceClient 

Source
pub trait DurableServiceClient: Send + Sync {
    // Required methods
    fn checkpoint<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        durable_execution_arn: &'life1 str,
        checkpoint_token: &'life2 str,
        operations: Vec<OperationUpdate>,
    ) -> Pin<Box<dyn Future<Output = Result<CheckpointResponse, DurableError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             Self: 'async_trait;
    fn get_operations<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        durable_execution_arn: &'life1 str,
        next_marker: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<GetOperationsResponse, DurableError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             Self: 'async_trait;
}
Expand description

Trait for communicating with the durable execution service.

This trait abstracts the communication layer, allowing for different implementations (e.g., Lambda client, mock client for testing).

Required Methods§

Source

fn checkpoint<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, durable_execution_arn: &'life1 str, checkpoint_token: &'life2 str, operations: Vec<OperationUpdate>, ) -> Pin<Box<dyn Future<Output = Result<CheckpointResponse, DurableError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Sends a batch of checkpoint operations to the service.

§Arguments
  • durable_execution_arn - The ARN of the durable execution
  • checkpoint_token - The token for this checkpoint batch
  • operations - The operations to checkpoint
§Returns

A new checkpoint token on success, or an error on failure.

Source

fn get_operations<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, durable_execution_arn: &'life1 str, next_marker: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<GetOperationsResponse, DurableError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Retrieves additional operations for pagination.

§Arguments
  • durable_execution_arn - The ARN of the durable execution
  • next_marker - The pagination marker from the previous response
§Returns

A list of operations and an optional next marker for further pagination.

Implementors§