pub struct PgStore { /* private fields */ }Implementations§
Source§impl PgStore
impl PgStore
pub fn connect(url: &str) -> Result<PgStore>
Sourcepub fn connect_with(url: &str, mode: PgMode) -> Result<PgStore>
pub fn connect_with(url: &str, mode: PgMode) -> Result<PgStore>
Connect with a write mode (see PgMode).
pub fn mode(&self) -> PgMode
pub fn put_definition(&self, ir: &WorkflowIr, now: u64) -> Result<PutDefinition>
pub fn definitions(&self) -> Result<Vec<WorkflowIr>>
pub fn execution_exists(&self, id: &str) -> Result<bool>
pub fn append( &mut self, state: &ExecutionState, events: &[HistoryEvent], ) -> Result<()>
pub fn history(&self, id: &str) -> Result<Vec<HistoryEvent>>
pub fn append_rollover( &mut self, state: &ExecutionState, events: &[HistoryEvent], rollover: Rollover<'_>, ) -> Result<()>
pub fn run_history(&self, id: &str, run: u32) -> Result<Vec<HistoryEvent>>
pub fn execution_status(&self, id: &str) -> Result<Option<String>>
pub fn active_execution_ids(&self) -> Result<Vec<String>>
pub fn list_executions( &self, status: Option<&str>, workflow: Option<&str>, limit: u32, ) -> Result<Vec<ExecutionSummary>>
pub fn count_by_status(&self) -> Result<Vec<(String, u64)>>
pub fn upsert_worker(&self, w: &WorkerRecord) -> Result<()>
pub fn touch_worker(&self, worker_id: &str, now: u64) -> Result<()>
pub fn workers(&self) -> Result<Vec<WorkerRecord>>
Source§impl PgStore
impl PgStore
pub fn insert_schedule(&self, row: &ScheduleRow) -> Result<bool>
pub fn update_schedule(&self, row: &ScheduleRow) -> Result<bool>
pub fn schedule(&self, id: &str) -> Result<Option<ScheduleRow>>
pub fn schedules(&self) -> Result<Vec<ScheduleRow>>
pub fn delete_schedule(&self, id: &str) -> Result<bool>
pub fn due_schedules(&self, now: u64) -> Result<Vec<ScheduleRow>>
pub fn claim_schedule( &self, id: &str, next_fire_ms: u64, node: &str, now: u64, until: u64, ) -> Result<bool>
pub fn finish_schedule_fire( &self, id: &str, next_fire_ms: u64, node: &str, now: u64, rec: &FireRecord, ) -> Result<bool>
pub fn release_schedule_claims(&self) -> Result<u64>
pub fn release_schedule_claim( &self, id: &str, node: &str, retry_at: u64, error: &str, now: u64, ) -> Result<()>
pub fn record_schedule_trigger( &self, id: &str, execution_id: &str, now: u64, ) -> Result<()>
Auto Trait Implementations§
impl Forget for PgStore
impl Freeze for PgStore
impl Move for PgStore
impl RefUnwindSafe for PgStore
impl Send for PgStore
impl Sync for PgStore
impl Unpin for PgStore
impl UnsafeUnpin for PgStore
impl UnwindSafe for PgStore
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request