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
11
12
13
use async_trait::async_trait;

use crate::models::QueueType;

/// Queue provider for distributing workflow execution across workers.
#[async_trait]
pub trait QueueProvider: Send + Sync {
    async fn queue_work(&self, id: &str, queue: QueueType) -> crate::Result<()>;
    async fn dequeue_work(&self, queue: QueueType) -> crate::Result<Option<String>>;
    fn is_dequeue_blocking(&self) -> bool;
    async fn start(&self) -> crate::Result<()>;
    async fn stop(&self) -> crate::Result<()>;
}