wfe-core 1.9.2

Core traits, models, builder, and executor for the WFE workflow engine
Documentation
1
2
3
4
5
6
7
8
9
10
use async_trait::async_trait;

/// Distributed lock provider for preventing concurrent execution of the same workflow.
#[async_trait]
pub trait DistributedLockProvider: Send + Sync {
    async fn acquire_lock(&self, resource: &str) -> crate::Result<bool>;
    async fn release_lock(&self, resource: &str) -> crate::Result<()>;
    async fn start(&self) -> crate::Result<()>;
    async fn stop(&self) -> crate::Result<()>;
}