pub struct WorkflowTaskGovernanceControlPlane<S, A> { /* private fields */ }Expand description
Authorized facade over the destructive tombstone governance store.
Implementations§
Source§impl<S, A> WorkflowTaskGovernanceControlPlane<S, A>
impl<S, A> WorkflowTaskGovernanceControlPlane<S, A>
Sourcepub fn with_observer(
self,
observer: Arc<dyn WorkflowTaskGovernanceObserver>,
) -> Self
pub fn with_observer( self, observer: Arc<dyn WorkflowTaskGovernanceObserver>, ) -> Self
Attaches a low-cardinality outcome observer.
Sourcepub async fn place_hold(
&self,
principal: &WorkerId,
tenant_id: WorkflowTenantId,
checkpoint_id: CheckpointId,
reason: WorkflowTaskLegalHoldReason,
) -> Result<WorkflowTaskLegalHold, WorkflowTaskGovernanceError>
pub async fn place_hold( &self, principal: &WorkerId, tenant_id: WorkflowTenantId, checkpoint_id: CheckpointId, reason: WorkflowTaskLegalHoldReason, ) -> Result<WorkflowTaskLegalHold, WorkflowTaskGovernanceError>
Places a hold using the authenticated principal as the audit actor.
§Errors
Fails closed on denied authority or store failure.
Sourcepub async fn release_hold(
&self,
principal: &WorkerId,
tenant_id: WorkflowTenantId,
checkpoint_id: CheckpointId,
) -> Result<WorkflowTaskLegalHold, WorkflowTaskGovernanceError>
pub async fn release_hold( &self, principal: &WorkerId, tenant_id: WorkflowTenantId, checkpoint_id: CheckpointId, ) -> Result<WorkflowTaskLegalHold, WorkflowTaskGovernanceError>
Releases a hold using the authenticated principal as the audit actor.
§Errors
Fails closed on denied authority or store failure.
Sourcepub async fn export_next_page<R>(
&self,
principal: &WorkerId,
tenant_id: WorkflowTenantId,
after: Option<WorkflowTaskTombstoneCursor>,
limit: WorkflowTaskTombstoneLimit,
archive: &R,
) -> Result<WorkflowTaskTombstoneArchiveReport, WorkflowTaskGovernanceError>where
R: WorkflowTaskTombstoneArchive,
pub async fn export_next_page<R>(
&self,
principal: &WorkerId,
tenant_id: WorkflowTenantId,
after: Option<WorkflowTaskTombstoneCursor>,
limit: WorkflowTaskTombstoneLimit,
archive: &R,
) -> Result<WorkflowTaskTombstoneArchiveReport, WorkflowTaskGovernanceError>where
R: WorkflowTaskTombstoneArchive,
Archives one page and confirms its watermark only after receipt.
§Errors
Fails closed on denied authority, source-store failure, archive failure, or durable confirmation failure.
Sourcepub async fn prepare_purge(
&self,
principal: &WorkerId,
lease: WorkflowTaskCleanupLease,
retention: WorkflowTaskTombstoneRetention,
limit: WorkflowTaskTombstonePurgeLimit,
approval_window: WorkflowTaskTombstoneApprovalWindow,
) -> Result<WorkflowTaskTombstonePurgeIntent, WorkflowTaskGovernanceError>
pub async fn prepare_purge( &self, principal: &WorkerId, lease: WorkflowTaskCleanupLease, retention: WorkflowTaskTombstoneRetention, limit: WorkflowTaskTombstonePurgeLimit, approval_window: WorkflowTaskTombstoneApprovalWindow, ) -> Result<WorkflowTaskTombstonePurgeIntent, WorkflowTaskGovernanceError>
Prepares a purge only when the lease belongs to the principal.
§Errors
Rejects denied authority, a mismatched lease principal, or store failure.
Sourcepub async fn approve_purge(
&self,
principal: &WorkerId,
tenant_id: WorkflowTenantId,
purge_id: WorkflowTaskTombstonePurgeId,
) -> Result<WorkflowTaskTombstonePurgeIntent, WorkflowTaskGovernanceError>
pub async fn approve_purge( &self, principal: &WorkerId, tenant_id: WorkflowTenantId, purge_id: WorkflowTaskTombstonePurgeId, ) -> Result<WorkflowTaskTombstonePurgeIntent, WorkflowTaskGovernanceError>
Approves using the authenticated principal, preserving four-eyes checks.
§Errors
Fails closed on denied authority or store governance failure.
Sourcepub async fn list_purge_approvals(
&self,
principal: &WorkerId,
tenant_id: WorkflowTenantId,
limit: WorkflowTaskTombstoneApprovalInboxLimit,
) -> Result<Vec<WorkflowTaskTombstoneApprovalInboxItem>, WorkflowTaskGovernanceError>
pub async fn list_purge_approvals( &self, principal: &WorkerId, tenant_id: WorkflowTenantId, limit: WorkflowTaskTombstoneApprovalInboxLimit, ) -> Result<Vec<WorkflowTaskTombstoneApprovalInboxItem>, WorkflowTaskGovernanceError>
Lists the tenant’s bounded durable approval inbox.
§Errors
Fails closed on denied authority or store failure.
Sourcepub async fn claim_purge_approval(
&self,
principal: &WorkerId,
tenant_id: WorkflowTenantId,
lease: LeaseDuration,
) -> Result<Option<WorkflowTaskTombstoneApprovalLease>, WorkflowTaskGovernanceError>
pub async fn claim_purge_approval( &self, principal: &WorkerId, tenant_id: WorkflowTenantId, lease: LeaseDuration, ) -> Result<Option<WorkflowTaskTombstoneApprovalLease>, WorkflowTaskGovernanceError>
Claims the oldest eligible approval using the authenticated reviewer.
§Errors
Fails closed on denied authority or store failure.
Sourcepub async fn approve_claimed_purge(
&self,
principal: &WorkerId,
lease: WorkflowTaskTombstoneApprovalLease,
) -> Result<WorkflowTaskTombstonePurgeIntent, WorkflowTaskGovernanceError>
pub async fn approve_claimed_purge( &self, principal: &WorkerId, lease: WorkflowTaskTombstoneApprovalLease, ) -> Result<WorkflowTaskTombstonePurgeIntent, WorkflowTaskGovernanceError>
Approves an exact principal-owned reviewer lease.
§Errors
Rejects a mismatched reviewer, denied authority, or stale lease.
Sourcepub async fn reject_claimed_purge(
&self,
principal: &WorkerId,
lease: WorkflowTaskTombstoneApprovalLease,
reason: WorkflowTaskTombstoneRejectionReason,
) -> Result<WorkflowTaskTombstoneApprovalInboxItem, WorkflowTaskGovernanceError>
pub async fn reject_claimed_purge( &self, principal: &WorkerId, lease: WorkflowTaskTombstoneApprovalLease, reason: WorkflowTaskTombstoneRejectionReason, ) -> Result<WorkflowTaskTombstoneApprovalInboxItem, WorkflowTaskGovernanceError>
Rejects an exact principal-owned reviewer lease with durable evidence.
§Errors
Rejects a mismatched reviewer, denied authority, or stale lease.
Sourcepub async fn execute_purge(
&self,
principal: &WorkerId,
lease: WorkflowTaskCleanupLease,
purge_id: WorkflowTaskTombstonePurgeId,
) -> Result<WorkflowTaskTombstonePurgeEvidence, WorkflowTaskGovernanceError>
pub async fn execute_purge( &self, principal: &WorkerId, lease: WorkflowTaskCleanupLease, purge_id: WorkflowTaskTombstonePurgeId, ) -> Result<WorkflowTaskTombstonePurgeEvidence, WorkflowTaskGovernanceError>
Executes using an exact principal-owned fenced lease.
§Errors
Rejects denied authority, a mismatched lease principal, or store execution failure.
Sourcepub async fn get_evidence(
&self,
principal: &WorkerId,
tenant_id: WorkflowTenantId,
purge_id: WorkflowTaskTombstonePurgeId,
) -> Result<Option<WorkflowTaskTombstonePurgeEvidence>, WorkflowTaskGovernanceError>
pub async fn get_evidence( &self, principal: &WorkerId, tenant_id: WorkflowTenantId, purge_id: WorkflowTaskTombstonePurgeId, ) -> Result<Option<WorkflowTaskTombstonePurgeEvidence>, WorkflowTaskGovernanceError>
Reads evidence under an explicit tenant-scoped grant.
§Errors
Fails closed on denied authority or store failure.