pub struct WorkerRevocationManager { /* private fields */ }Expand description
Thread-safe revocation manager for workers
Implementations§
Source§impl WorkerRevocationManager
impl WorkerRevocationManager
Sourcepub fn revoke(&self, task_id: Uuid, mode: RevocationMode)
pub fn revoke(&self, task_id: Uuid, mode: RevocationMode)
Revoke a task by ID
Sourcepub fn revoke_with_request(&self, request: RevocationRequest)
pub fn revoke_with_request(&self, request: RevocationRequest)
Revoke a task with a full request
Sourcepub fn revoke_by_pattern(&self, pattern: &str, mode: RevocationMode)
pub fn revoke_by_pattern(&self, pattern: &str, mode: RevocationMode)
Revoke by pattern
Sourcepub fn bulk_revoke(&self, task_ids: &[Uuid], mode: RevocationMode)
pub fn bulk_revoke(&self, task_ids: &[Uuid], mode: RevocationMode)
Bulk revoke multiple tasks
Sourcepub fn is_revoked(&self, task_id: Uuid) -> bool
pub fn is_revoked(&self, task_id: Uuid) -> bool
Check if a task is revoked by ID
Sourcepub fn check_revocation(
&self,
task_id: Uuid,
task_name: &str,
) -> RevocationResult
pub fn check_revocation( &self, task_id: Uuid, task_name: &str, ) -> RevocationResult
Check revocation status (by ID and pattern)
Sourcepub fn mark_terminated(&self, task_id: Uuid)
pub fn mark_terminated(&self, task_id: Uuid)
Mark a task as terminated
Sourcepub fn is_terminated(&self, task_id: Uuid) -> bool
pub fn is_terminated(&self, task_id: Uuid) -> bool
Check if a task has been terminated
Sourcepub fn cleanup_expired(&self)
pub fn cleanup_expired(&self)
Clean up expired revocations
Sourcepub fn revoked_ids(&self) -> Vec<Uuid>
pub fn revoked_ids(&self) -> Vec<Uuid>
Get all revoked task IDs
Sourcepub fn revoked_count(&self) -> usize
pub fn revoked_count(&self) -> usize
Get count of revoked tasks
Sourcepub fn export_state(&self) -> RevocationState
pub fn export_state(&self) -> RevocationState
Export state for persistence
Sourcepub fn import_state(&self, state: RevocationState)
pub fn import_state(&self, state: RevocationState)
Import state from persistence
Trait Implementations§
Source§impl Clone for WorkerRevocationManager
impl Clone for WorkerRevocationManager
Source§fn clone(&self) -> WorkerRevocationManager
fn clone(&self) -> WorkerRevocationManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WorkerRevocationManager
impl Debug for WorkerRevocationManager
Source§impl Default for WorkerRevocationManager
impl Default for WorkerRevocationManager
Source§fn default() -> WorkerRevocationManager
fn default() -> WorkerRevocationManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WorkerRevocationManager
impl RefUnwindSafe for WorkerRevocationManager
impl Send for WorkerRevocationManager
impl Sync for WorkerRevocationManager
impl Unpin for WorkerRevocationManager
impl UnwindSafe for WorkerRevocationManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more