Skip to main content

audit_reason_for_create

Function audit_reason_for_create 

Source
fn audit_reason_for_create(reason: CreateReason) -> ReplicaCreateDropReason
Expand description

Map a create decision’s CreateReason to the audit reason carried on the create event. Baseline audits ReplicaCreateDropReason::Manual, the tag for replicas the user’s own cluster config calls for. The match is exhaustive, so a new CreateReason variant is a compile error here instead of a silent Manual.

Drops never come through here: a drop happens exactly when no strategy desires the replica, so it carries no attribution and is uniformly audited ReplicaCreateDropReason::Retired.