pub struct JobsHost {
pub customer_app: String,
pub scheduler_node_id: String,
pub runtime: JobsRuntimeServices,
pub telemetry: TelemetryCatalog,
pub queue_topology: QueueTopology,
pub registered_jobs: Vec<RuntimeJobDefinition>,
pub registered_event_subscriptions: Vec<RuntimeEventSubscriptionDefinition>,
pub jobs_domain: JobsDomain,
pub shared_backend_namespace: String,
/* private fields */
}Fields§
§customer_app: String§scheduler_node_id: String§runtime: JobsRuntimeServices§telemetry: TelemetryCatalog§queue_topology: QueueTopology§registered_jobs: Vec<RuntimeJobDefinition>§registered_event_subscriptions: Vec<RuntimeEventSubscriptionDefinition>§jobs_domain: JobsDomainImplementations§
Source§impl JobsHost
impl JobsHost
pub fn enqueue_spec( &mut self, spec: JobSpec, now: JobInstant, ) -> Result<JobId, RuntimeJobsError>
pub fn retry_dead_letter( &mut self, dead_letter_id: impl Into<String>, now_unix_seconds: u64, ) -> Result<JobId, RuntimeJobsError>
pub fn enqueue_job( &mut self, request: JobDispatchRequest, now: JobInstant, ) -> Result<JobId, RuntimeJobsError>
pub fn emit_domain_event( &mut self, request: DomainEventDispatchRequest, now: JobInstant, ) -> Result<DomainEventDispatch, RuntimeJobsError>
pub fn acquire_scheduler_leadership( &mut self, now: JobInstant, lease_ttl: Duration, ) -> Result<SchedulerLeadership, RuntimeJobsError>
pub fn promote_due_jobs( &mut self, now: JobInstant, ) -> Result<Vec<JobId>, RuntimeJobsError>
pub fn lease_ready_jobs( &mut self, queue: &JobQueueName, worker_id: impl Into<String>, now: JobInstant, lease_ttl: Duration, max_jobs: usize, ) -> Result<Vec<JobLease>, RuntimeJobsError>
pub fn acknowledge_completed( &mut self, lease: &JobLease, now: JobInstant, ) -> Result<(), RuntimeJobsError>
pub fn acknowledge_failed( &mut self, lease: &JobLease, now: JobInstant, reason: DeadLetterReason, error_message: impl Into<String>, ) -> Result<JobFailureDisposition, RuntimeJobsError>
pub fn coordinator(&self) -> &JobsCoordinator
pub fn queue_snapshot(&mut self) -> JobsQueueSnapshot
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JobsHost
impl !RefUnwindSafe for JobsHost
impl Send for JobsHost
impl Sync for JobsHost
impl Unpin for JobsHost
impl UnsafeUnpin for JobsHost
impl !UnwindSafe for JobsHost
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 more