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§
- IamSnapshot
Lock - 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.