pub enum Store {
Sqlite(SqliteStore),
Postgres(PgStore),
}Expand description
The storage backend used by the engine.
Variants§
Sqlite(SqliteStore)
Postgres(PgStore)
Implementations§
Source§impl Store
impl Store
Sourcepub fn connect(location: &str) -> Result<Store>
pub fn connect(location: &str) -> Result<Store>
Open a backend from a location: a postgres:// / postgresql:// URL,
or a SQLite file path.
pub fn in_memory() -> Result<Store>
pub fn backend(&self) -> &'static str
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>
Sourcepub fn append(
&mut self,
state: &ExecutionState,
events: &[HistoryEvent],
) -> Result<()>
pub fn append( &mut self, state: &ExecutionState, events: &[HistoryEvent], ) -> Result<()>
Atomically append events and update the execution projection.
pub fn history(&self, id: &str) -> Result<Vec<HistoryEvent>>
Sourcepub fn active_execution_ids(&self) -> Result<Vec<String>>
pub fn active_execution_ids(&self) -> Result<Vec<String>>
Ids of executions that have not reached a terminal status.
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>>
Auto Trait Implementations§
impl !Freeze for Store
impl !RefUnwindSafe for Store
impl !Sync for Store
impl !UnwindSafe for Store
impl Forget for Store
impl Move for Store
impl Send for Store
impl Unpin for Store
impl UnsafeUnpin for Store
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