pub struct PostgresPersistence { /* private fields */ }Expand description
PostgreSQL-backed persistence implementation.
Implementations§
Trait Implementations§
Source§impl Clone for PostgresPersistence
impl Clone for PostgresPersistence
Source§impl Persistence for PostgresPersistence
impl Persistence for PostgresPersistence
fn register_instance<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
tenant_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_instance<'life0, 'life1, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<InstanceRecord>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_instance_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
status: &'life2 str,
started_at: Option<DateTime<Utc>>,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_instance_checkpoint<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
checkpoint_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn complete_instance<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
output: Option<&'life2 [u8]>,
error: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn save_checkpoint<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
checkpoint_id: &'life2 str,
state: &'life3 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn load_checkpoint<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
checkpoint_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<CheckpointRecord>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_checkpoints<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
checkpoint_id: Option<&'life2 str>,
limit: i64,
offset: i64,
created_after: Option<DateTime<Utc>>,
created_before: Option<DateTime<Utc>>,
) -> Pin<Box<dyn Future<Output = Result<Vec<CheckpointRecord>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn count_checkpoints<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
checkpoint_id: Option<&'life2 str>,
created_after: Option<DateTime<Utc>>,
created_before: Option<DateTime<Utc>>,
) -> Pin<Box<dyn Future<Output = Result<i64, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn insert_event<'life0, 'life1, 'async_trait>(
&'life0 self,
event: &'life1 EventRecord,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn insert_signal<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
signal_type: &'life2 str,
payload: &'life3 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn get_pending_signal<'life0, 'life1, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SignalRecord>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn acknowledge_signal<'life0, 'life1, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn insert_custom_signal<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
checkpoint_id: &'life2 str,
payload: &'life3 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn take_pending_custom_signal<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
checkpoint_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<CustomSignalRecord>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn save_retry_attempt<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
checkpoint_id: &'life2 str,
attempt: i32,
error_message: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn list_instances<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant_id: Option<&'life1 str>,
status: Option<&'life2 str>,
limit: i64,
offset: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<InstanceRecord>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn health_check_db<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn count_active_instances<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<i64, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn set_instance_sleep<'life0, 'life1, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
sleep_until: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set_instance_sleep<'life0, 'life1, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
sleep_until: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Set the sleep_until timestamp for an instance.
Source§fn clear_instance_sleep<'life0, 'life1, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn clear_instance_sleep<'life0, 'life1, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Clear the sleep_until timestamp for an instance.
Source§fn get_sleeping_instances_due<'life0, 'async_trait>(
&'life0 self,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<InstanceRecord>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_sleeping_instances_due<'life0, 'async_trait>(
&'life0 self,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<InstanceRecord>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get instances that are due to wake (sleep_until <= now).
Source§fn list_events<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
filter: &'life2 ListEventsFilter,
limit: i64,
offset: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<EventRecord>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_events<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
filter: &'life2 ListEventsFilter,
limit: i64,
offset: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<EventRecord>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
List events for an instance with filtering and pagination. Read more
Source§fn count_events<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
filter: &'life2 ListEventsFilter,
) -> Pin<Box<dyn Future<Output = Result<i64, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn count_events<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
filter: &'life2 ListEventsFilter,
) -> Pin<Box<dyn Future<Output = Result<i64, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Count events for an instance with filtering.
Source§fn list_step_summaries<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
filter: &'life2 ListStepSummariesFilter,
limit: i64,
offset: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<StepSummaryRecord>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_step_summaries<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
filter: &'life2 ListStepSummariesFilter,
limit: i64,
offset: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<StepSummaryRecord>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
List step summaries for an instance, pairing step_debug_start and step_debug_end events. Read more
Source§fn count_step_summaries<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
filter: &'life2 ListStepSummariesFilter,
) -> Pin<Box<dyn Future<Output = Result<i64, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn count_step_summaries<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
filter: &'life2 ListStepSummariesFilter,
) -> Pin<Box<dyn Future<Output = Result<i64, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Count step summaries for an instance with filtering.
Source§fn complete_instance_extended<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
status: &'life2 str,
output: Option<&'life3 [u8]>,
error: Option<&'life4 str>,
stderr: Option<&'life5 str>,
checkpoint_id: Option<&'life6 str>,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
fn complete_instance_extended<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
status: &'life2 str,
output: Option<&'life3 [u8]>,
error: Option<&'life4 str>,
stderr: Option<&'life5 str>,
checkpoint_id: Option<&'life6 str>,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
Complete an instance with extended fields (stderr, checkpoint). Read more
Source§fn complete_instance_if_running<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
status: &'life2 str,
output: Option<&'life3 [u8]>,
error: Option<&'life4 str>,
stderr: Option<&'life5 str>,
checkpoint_id: Option<&'life6 str>,
) -> Pin<Box<dyn Future<Output = Result<bool, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
fn complete_instance_if_running<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
status: &'life2 str,
output: Option<&'life3 [u8]>,
error: Option<&'life4 str>,
stderr: Option<&'life5 str>,
checkpoint_id: Option<&'life6 str>,
) -> Pin<Box<dyn Future<Output = Result<bool, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
Complete an instance only if its current status is ‘running’. Read more
Source§fn complete_instance_with_termination<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
status: &'life2 str,
termination_reason: Option<&'life3 str>,
exit_code: Option<i32>,
output: Option<&'life4 [u8]>,
error: Option<&'life5 str>,
stderr: Option<&'life6 str>,
checkpoint_id: Option<&'life7 str>,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
'life7: 'async_trait,
fn complete_instance_with_termination<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
status: &'life2 str,
termination_reason: Option<&'life3 str>,
exit_code: Option<i32>,
output: Option<&'life4 [u8]>,
error: Option<&'life5 str>,
stderr: Option<&'life6 str>,
checkpoint_id: Option<&'life7 str>,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
'life7: 'async_trait,
Complete an instance with termination tracking metadata. Read more
Source§fn complete_instance_with_termination_if_running<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
status: &'life2 str,
termination_reason: Option<&'life3 str>,
exit_code: Option<i32>,
output: Option<&'life4 [u8]>,
error: Option<&'life5 str>,
stderr: Option<&'life6 str>,
checkpoint_id: Option<&'life7 str>,
) -> Pin<Box<dyn Future<Output = Result<bool, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
'life7: 'async_trait,
fn complete_instance_with_termination_if_running<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
status: &'life2 str,
termination_reason: Option<&'life3 str>,
exit_code: Option<i32>,
output: Option<&'life4 [u8]>,
error: Option<&'life5 str>,
stderr: Option<&'life6 str>,
checkpoint_id: Option<&'life7 str>,
) -> Pin<Box<dyn Future<Output = Result<bool, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
'life7: 'async_trait,
Complete an instance with termination tracking, only if status is ‘running’. Read more
Source§fn update_instance_metrics<'life0, 'life1, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
memory_peak_bytes: Option<u64>,
cpu_usage_usec: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_instance_metrics<'life0, 'life1, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
memory_peak_bytes: Option<u64>,
cpu_usage_usec: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update execution metrics for an instance (memory, CPU usage). Read more
Source§fn update_instance_stderr<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
stderr: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_instance_stderr<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
stderr: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Update instance stderr output. Read more
Source§fn store_instance_input<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
input: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn store_instance_input<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
input: &'life2 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Store input data for an instance. Read more
Source§fn get_terminal_instances_older_than<'life0, 'async_trait>(
&'life0 self,
older_than: DateTime<Utc>,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_terminal_instances_older_than<'life0, 'async_trait>(
&'life0 self,
older_than: DateTime<Utc>,
limit: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get terminal instance IDs older than the specified timestamp. Read more
Source§fn delete_instances_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
instance_ids: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<u64, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_instances_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
instance_ids: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<u64, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete instances by their IDs. Read more
Source§fn record_error<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'life8, 'life9, 'async_trait>(
&'life0 self,
_instance_id: &'life1 str,
_checkpoint_id: Option<&'life2 str>,
_step_id: Option<&'life3 str>,
_error_code: &'life4 str,
_error_message: &'life5 str,
_category: &'life6 str,
_severity: &'life7 str,
_retry_hint: Option<&'life8 str>,
_retry_after_ms: Option<i64>,
_attributes: Option<&'life9 Value>,
_cause_error_id: Option<i64>,
) -> Pin<Box<dyn Future<Output = Result<i64, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
'life7: 'async_trait,
'life8: 'async_trait,
'life9: 'async_trait,
fn record_error<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'life8, 'life9, 'async_trait>(
&'life0 self,
_instance_id: &'life1 str,
_checkpoint_id: Option<&'life2 str>,
_step_id: Option<&'life3 str>,
_error_code: &'life4 str,
_error_message: &'life5 str,
_category: &'life6 str,
_severity: &'life7 str,
_retry_hint: Option<&'life8 str>,
_retry_after_ms: Option<i64>,
_attributes: Option<&'life9 Value>,
_cause_error_id: Option<i64>,
) -> Pin<Box<dyn Future<Output = Result<i64, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
'life7: 'async_trait,
'life8: 'async_trait,
'life9: 'async_trait,
Record a structured error in the error history table. Read more
Source§fn get_last_error<'life0, 'life1, 'async_trait>(
&'life0 self,
_instance_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ErrorHistoryRecord>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_last_error<'life0, 'life1, 'async_trait>(
&'life0 self,
_instance_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ErrorHistoryRecord>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the most recent error for an instance.
Source§fn list_errors<'life0, 'life1, 'async_trait>(
&'life0 self,
_instance_id: &'life1 str,
_limit: i64,
_offset: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<ErrorHistoryRecord>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_errors<'life0, 'life1, 'async_trait>(
&'life0 self,
_instance_id: &'life1 str,
_limit: i64,
_offset: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<ErrorHistoryRecord>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List errors for an instance.
Source§fn register_compensatable_checkpoint<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_instance_id: &'life1 str,
_checkpoint_id: &'life2 str,
_compensation_step_id: &'life3 str,
_compensation_data: Option<&'life4 [u8]>,
_compensation_order: i32,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn register_compensatable_checkpoint<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_instance_id: &'life1 str,
_checkpoint_id: &'life2 str,
_compensation_step_id: &'life3 str,
_compensation_data: Option<&'life4 [u8]>,
_compensation_order: i32,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Mark a checkpoint as compensatable (for saga pattern).
Source§fn get_compensatable_checkpoints<'life0, 'life1, 'async_trait>(
&'life0 self,
_instance_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<CheckpointRecord>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_compensatable_checkpoints<'life0, 'life1, 'async_trait>(
&'life0 self,
_instance_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<CheckpointRecord>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get all compensatable checkpoints for an instance (in reverse order).
Source§fn set_checkpoint_compensation_state<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_instance_id: &'life1 str,
_checkpoint_id: &'life2 str,
_state: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn set_checkpoint_compensation_state<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_instance_id: &'life1 str,
_checkpoint_id: &'life2 str,
_state: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Update the compensation state of a checkpoint.
Source§fn set_instance_compensation_state<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_instance_id: &'life1 str,
_state: &'life2 str,
_reason: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn set_instance_compensation_state<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_instance_id: &'life1 str,
_state: &'life2 str,
_reason: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Update the instance-level compensation state.
Source§fn log_compensation_attempt<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_instance_id: &'life1 str,
_checkpoint_id: &'life2 str,
_compensation_step_id: &'life3 str,
_success: bool,
_error_message: Option<&'life4 str>,
_error_id: Option<i64>,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn log_compensation_attempt<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_instance_id: &'life1 str,
_checkpoint_id: &'life2 str,
_compensation_step_id: &'life3 str,
_success: bool,
_error_message: Option<&'life4 str>,
_error_id: Option<i64>,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Log a compensation attempt.
Source§fn count_pending_compensations<'life0, 'life1, 'async_trait>(
&'life0 self,
_instance_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<i64, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn count_pending_compensations<'life0, 'life1, 'async_trait>(
&'life0 self,
_instance_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<i64, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Count pending compensations for an instance.
Source§fn all_compensations_succeeded<'life0, 'life1, 'async_trait>(
&'life0 self,
_instance_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn all_compensations_succeeded<'life0, 'life1, 'async_trait>(
&'life0 self,
_instance_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if all compensations for an instance succeeded.
Auto Trait Implementations§
impl !RefUnwindSafe for PostgresPersistence
impl !UnwindSafe for PostgresPersistence
impl Freeze for PostgresPersistence
impl Send for PostgresPersistence
impl Sync for PostgresPersistence
impl Unpin for PostgresPersistence
impl UnsafeUnpin for PostgresPersistence
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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 more