pub struct CronsClient { /* private fields */ }Expand description
Client for managing cron workflow triggers. Accessed via Hatchet::crons.
Supports both 5-field (* * * * *) and 6-field (* * * * * *) cron expressions.
Requires a token with a sub (tenant ID) claim.
Implementations§
Source§impl CronsClient
impl CronsClient
Sourcepub async fn create(
&self,
workflow_name: &str,
opts: CreateCronOpts,
) -> Result<CronTrigger, HatchetError>
pub async fn create( &self, workflow_name: &str, opts: CreateCronOpts, ) -> Result<CronTrigger, HatchetError>
Create a cron trigger for the given workflow. Validates the expression client-side before calling the API.
Sourcepub async fn get(&self, cron_id: &str) -> Result<CronTrigger, HatchetError>
pub async fn get(&self, cron_id: &str) -> Result<CronTrigger, HatchetError>
Retrieve a cron trigger by ID.
Sourcepub async fn list(
&self,
opts: ListCronsOpts,
) -> Result<CronTriggerList, HatchetError>
pub async fn list( &self, opts: ListCronsOpts, ) -> Result<CronTriggerList, HatchetError>
List cron triggers, optionally filtered by workflow, name, or metadata.
Trait Implementations§
Source§impl Clone for CronsClient
impl Clone for CronsClient
Source§fn clone(&self) -> CronsClient
fn clone(&self) -> CronsClient
Returns a duplicate of the value. Read more
1.0.0 · 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 Freeze for CronsClient
impl !RefUnwindSafe for CronsClient
impl Send for CronsClient
impl Sync for CronsClient
impl Unpin for CronsClient
impl UnsafeUnpin for CronsClient
impl !UnwindSafe for CronsClient
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> 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