Skip to main content

hyperlane_plugin_scheduler/
lib.rs

1//! hyperlane-plugin-scheduler
2//!
3//! Background async interval and 5-field cron job scheduler for Hyperlane
4//! featuring lock-free overlap prevention, Tokio task panic isolation,
5//! atomic per-job metrics, and graceful shutdown.
6
7mod r#const;
8mod r#enum;
9mod r#fn;
10mod r#impl;
11mod r#struct;
12mod r#trait;
13
14#[cfg(test)]
15#[path = "../tests/mod.rs"]
16mod tests;
17
18pub use {r#const::*, r#enum::*, r#struct::*, r#trait::*};
19
20pub(crate) use r#fn::*;
21
22use std::{
23    error::Error,
24    fmt::{self, Display, Formatter},
25    future::Future,
26    marker::PhantomData,
27    pin::Pin,
28    sync::{
29        Arc,
30        atomic::{AtomicBool, AtomicU64, Ordering},
31    },
32    time::{Duration, SystemTime, UNIX_EPOCH},
33};
34
35use {
36    hyperlane::tokio::{
37        select, spawn,
38        sync::watch::{self, Receiver, Sender},
39        task::{JoinError, JoinHandle},
40        time::{Instant, sleep, sleep_until},
41    },
42    lombok_macros::*,
43};