Struct ora_client::Schedules
source · pub struct Schedules {
pub active: Option<bool>,
pub added_after: Option<OffsetDateTime>,
pub added_before: Option<OffsetDateTime>,
pub cancelled_after: Option<OffsetDateTime>,
pub cancelled_before: Option<OffsetDateTime>,
pub search: Option<String>,
pub include_labels: Option<Vec<LabelMatch>>,
pub kind: Option<String>,
pub order: ScheduleListOrder,
pub offset: u64,
pub limit: u64,
}
Expand description
Search options for retrieving a list of tasks.
Fields§
§active: Option<bool>
Only include schedules that are either active or inactive.
added_after: Option<OffsetDateTime>
Only include schedules added after the given timestamp (inclusive).
added_before: Option<OffsetDateTime>
Only include schedules added before the given timestamp (exclusive).
cancelled_after: Option<OffsetDateTime>
Only include schedules cancelled after the given timestamp (inclusive).
cancelled_before: Option<OffsetDateTime>
Only include schedules cancelled before the given timestamp (exclusive).
search: Option<String>
A search text, how it is used is up to the store.
include_labels: Option<Vec<LabelMatch>>
Include only matching labels.
kind: Option<String>
Only return schedules that are known to spawn tasks with the given selector kind.
order: ScheduleListOrder
The way tasks are ordered before applying offset and limit.
offset: u64
The offset.
limit: u64
The maximum amount of schedules to fetch.
Implementations§
source§impl Schedules
impl Schedules
sourcepub fn all() -> Self
pub fn all() -> Self
Include all schedules without applying any filters nor limits.
caution: It does include ALL schedules without a limit.
sourcepub fn with_label(self, label: &str) -> Self
pub fn with_label(self, label: &str) -> Self
Select schedules that contain the given label with any value.
sourcepub fn with_label_value(self, label: &str, value: impl Serialize) -> Self
pub fn with_label_value(self, label: &str, value: impl Serialize) -> Self
Select schedules that contain the given label and a specific value.
§Panics
Panics if the given value is not JSON-serializable.
sourcepub fn with_worker_selector(self, selector: WorkerSelector) -> Self
pub fn with_worker_selector(self, selector: WorkerSelector) -> Self
Only include schedules with a known matching worker selector.