Skip to main content

Module persistence

Module persistence 

Source
Expand description

Shared IAM snapshot persistence.

Both IamService and StsService operate on the same SharedIamState and therefore share a single on-disk snapshot. The save routine and the serializing Mutex live here so both services route through the same critical section.

Functions§

new_snapshot_lock
save_iam_snapshot
Persist the current IAM state as a snapshot. Offloads the serde + blocking file write to the Tokio blocking pool so the async runtime stays responsive.

Type Aliases§

IamSnapshotLock
Serializes concurrent snapshot writes across both IAM and STS services. Without it, two tasks could clone state under the RwLock, serialize independently, and race on store.save(), leaving older bytes as the final on-disk state.