pub struct Clockwork { /* private fields */ }Expand description
Clockwork service client — Cron-as-a-Service.
Schedules recurring cron jobs and one-off delayed jobs that invoke your HTTP endpoints, and reports on their execution history.
Obtain a Clockwork instance either as part of the unified Verne client
or standalone:
// Standalone
use nautilus_rs::Clockwork;
let clockwork = Clockwork::new("vrn_clockwork_live_sk_…");
// Via unified client
use nautilus_rs::Verne;
let verne = Verne::builder().clockwork("vrn_clockwork_live_sk_…").build()?;
let clockwork = verne.clockwork()?;Implementations§
Source§impl Clockwork
impl Clockwork
Sourcepub fn new(api_key: impl Into<String>) -> Self
pub fn new(api_key: impl Into<String>) -> Self
Create a Clockwork client with default settings.
Panics if the API key is empty or the HTTP client cannot be
initialised. Use Clockwork::builder for fallible construction.
Sourcepub fn builder() -> ClockworkBuilder
pub fn builder() -> ClockworkBuilder
Return a ClockworkBuilder for fine-grained configuration.
Sourcepub fn jobs(&self) -> CronJobsClient
pub fn jobs(&self) -> CronJobsClient
Return a CronJobsClient for managing recurring cron jobs.
Sourcepub fn delayed(&self) -> DelayedJobsClient
pub fn delayed(&self) -> DelayedJobsClient
Return a DelayedJobsClient for managing one-off delayed jobs.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Clockwork
impl !UnwindSafe for Clockwork
impl Freeze for Clockwork
impl Send for Clockwork
impl Sync for Clockwork
impl Unpin for Clockwork
impl UnsafeUnpin for Clockwork
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