pub struct InMemoryRuntime {
pub job_store: InMemoryJobStore,
pub recurring_store: InMemoryRecurringStore,
pub outbox_store: InMemoryOutboxStore,
pub job_attempt_store: InMemoryJobAttemptStore,
/* private fields */
}Fields§
§job_store: InMemoryJobStore§recurring_store: InMemoryRecurringStore§outbox_store: InMemoryOutboxStore§job_attempt_store: InMemoryJobAttemptStoreImplementations§
Source§impl InMemoryRuntime
impl InMemoryRuntime
pub fn new() -> Self
pub fn with_dependencies( clock: Arc<dyn Clock>, id_generator: Arc<dyn IdGenerator>, ) -> Self
pub fn with_dependencies_and_metrics( clock: Arc<dyn Clock>, id_generator: Arc<dyn IdGenerator>, metrics: Arc<dyn RuntimeMetrics>, ) -> Self
pub fn with_dependencies_and_telemetry( clock: Arc<dyn Clock>, id_generator: Arc<dyn IdGenerator>, metrics: Arc<dyn RuntimeMetrics>, tracing: Arc<dyn RuntimeTracing>, ) -> Self
pub fn replace_telemetry( &mut self, metrics: Arc<dyn RuntimeMetrics>, tracing: Arc<dyn RuntimeTracing>, )
pub fn tracing(&self) -> Arc<dyn RuntimeTracing>
pub fn configure_retention_policy(&self, policy: RetentionPolicy) -> Result<()>
pub fn register_handler<H: JobHandler + 'static>( &self, handler: H, ) -> Result<()>
pub fn register_event_publisher<P: EventPublisher + 'static>( &self, publisher: P, ) -> Result<()>
pub fn configure_outbox_publish_policy( &self, policy: OutboxPublishPolicy, ) -> Result<()>
pub async fn enqueue(&self, job: NewJob) -> Result<()>
pub async fn register_recurring( &self, definition: RecurringDefinition, ) -> Result<()>
pub async fn list_job_attempts(&self, job_id: &str) -> Result<Vec<JobAttempt>>
pub async fn list_attempts_by_guardrail_code( &self, guardrail_code: &str, ) -> Result<Vec<JobAttempt>>
pub async fn list_attempts_by_execution_id( &self, execution_id: &str, ) -> Result<Vec<JobAttempt>>
pub async fn list_lineage_events( &self, job_id: &str, ) -> Result<Vec<OutboxEvent>>
pub async fn list_lineage_events_by_execution_id( &self, execution_id: &str, ) -> Result<Vec<OutboxEvent>>
pub async fn list_lineage_events_by_thread_id( &self, thread_id: &str, ) -> Result<Vec<OutboxEvent>>
pub async fn investigate_lineage( &self, query: RuntimeLineageQuery, ) -> Result<RuntimeLineageReport>
pub async fn get_replay_report(&self, job_id: &str) -> Result<ReplayReport>
pub async fn process_once_now( &self, queue: &str, worker_id: &str, ) -> Result<Option<String>>
pub async fn replay_dead_letter_now(&self, job_id: &str) -> Result<bool>
pub async fn publish_pending_events_now(&self, limit: usize) -> Result<usize>
pub async fn materialize_recurring_now( &self, scheduler_id: &str, ) -> Result<usize>
pub async fn prune_terminal_records( &self, cutoff: DateTime<Utc>, ) -> Result<RetentionPruneReport>
pub async fn enforce_retention( &self, now: DateTime<Utc>, ) -> Result<RetentionPruneReport>
pub async fn enforce_retention_now(&self) -> Result<RetentionPruneReport>
pub async fn materialize_recurring( &self, now: DateTime<Utc>, scheduler_id: &str, ) -> Result<usize>
pub async fn process_once( &self, queue: &str, worker_id: &str, now: DateTime<Utc>, ) -> Result<Option<String>>
pub async fn replay_dead_letter( &self, job_id: &str, now: DateTime<Utc>, ) -> Result<bool>
pub async fn publish_pending_events( &self, limit: usize, now: DateTime<Utc>, ) -> Result<usize>
Trait Implementations§
Source§impl Clone for InMemoryRuntime
impl Clone for InMemoryRuntime
Source§fn clone(&self) -> InMemoryRuntime
fn clone(&self) -> InMemoryRuntime
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for InMemoryRuntime
impl !UnwindSafe for InMemoryRuntime
impl Freeze for InMemoryRuntime
impl Send for InMemoryRuntime
impl Sync for InMemoryRuntime
impl Unpin for InMemoryRuntime
impl UnsafeUnpin for InMemoryRuntime
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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