pub struct DynamoDbState {
pub account_id: String,
pub region: String,
pub tables: BTreeMap<String, DynamoTable>,
pub backups: BTreeMap<String, BackupDescription>,
pub global_tables: BTreeMap<String, GlobalTableDescription>,
pub exports: BTreeMap<String, ExportDescription>,
pub imports: BTreeMap<String, ImportDescription>,
pub lambda_stream_checkpoints: BTreeMap<String, String>,
}Fields§
§account_id: String§region: String§tables: BTreeMap<String, DynamoTable>§backups: BTreeMap<String, BackupDescription>§global_tables: BTreeMap<String, GlobalTableDescription>§exports: BTreeMap<String, ExportDescription>§imports: BTreeMap<String, ImportDescription>§lambda_stream_checkpoints: BTreeMap<String, String>DynamoDB Streams -> Lambda event-source-mapping checkpoints: the
last stream sequence number delivered for each mapping
(keyed by ESM uuid). Persisted so the streams poller resumes from
where it left off after a restart instead of re-seeding TRIM_HORIZON
and re-invoking the target Lambda with the whole retained backlog
(duplicate side effects). Mirrors KinesisState.lambda_checkpoints.
#[serde(default)] keeps older snapshots loadable.
Implementations§
Source§impl DynamoDbState
impl DynamoDbState
pub fn new(account_id: &str, region: &str) -> Self
pub fn reset(&mut self)
Sourcepub fn lambda_stream_checkpoint(&self, mapping_uuid: &str) -> Option<String>
pub fn lambda_stream_checkpoint(&self, mapping_uuid: &str) -> Option<String>
Last stream sequence number delivered for the given DynamoDB
Streams -> Lambda event source mapping, or None if the mapping
has never delivered (so the poller seeds from StartingPosition).
Sourcepub fn set_lambda_stream_checkpoint(
&mut self,
mapping_uuid: &str,
sequence_number: String,
)
pub fn set_lambda_stream_checkpoint( &mut self, mapping_uuid: &str, sequence_number: String, )
Record the last stream sequence number delivered for a mapping. The value rides along with the next DynamoDB snapshot save, exactly the way Kinesis lambda checkpoints persist through their snapshot.
Trait Implementations§
Source§impl AccountState for DynamoDbState
impl AccountState for DynamoDbState
Source§fn new_for_account(account_id: &str, region: &str, _endpoint: &str) -> Self
fn new_for_account(account_id: &str, region: &str, _endpoint: &str) -> Self
Source§fn inherit_from(&mut self, _sibling: &Self)
fn inherit_from(&mut self, _sibling: &Self)
MultiAccountState::get_or_create,
with a reference to an existing sibling state. Services can override
this to propagate shared resources (e.g. body caches) to the new state.Source§impl Clone for DynamoDbState
impl Clone for DynamoDbState
Source§fn clone(&self) -> DynamoDbState
fn clone(&self) -> DynamoDbState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more