#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Envelope {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub kind: ::prost::alloc::string::String,
#[prost(uint32, tag = "3")]
pub schema_version: u32,
#[prost(bytes = "vec", tag = "4")]
pub payload: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag = "5")]
pub queue: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub partition_key: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub rate_class: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub fingerprint: ::prost::alloc::string::String,
#[prost(uint32, tag = "9")]
pub attempt: u32,
#[prost(uint32, tag = "10")]
pub crash_attempt: u32,
#[prost(uint32, tag = "11")]
pub max_attempts: u32,
#[prost(int32, tag = "12")]
pub priority: i32,
#[prost(int64, tag = "13")]
pub enqueued_at_ms: i64,
#[prost(int64, tag = "14")]
pub scheduled_at_ms: i64,
#[prost(int64, tag = "15")]
pub timeout_ms: i64,
#[prost(int64, tag = "16")]
pub deadline_ms: i64,
#[prost(int64, tag = "17")]
pub retention_ms: i64,
#[prost(bytes = "vec", tag = "18")]
pub unique_key: ::prost::alloc::vec::Vec<u8>,
#[prost(uint32, tag = "19")]
pub unique_states: u32,
#[prost(map = "string, string", tag = "20")]
pub headers: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(message, repeated, tag = "21")]
pub errors: ::prost::alloc::vec::Vec<AttemptError>,
#[prost(int64, tag = "22")]
pub unique_window_ms: i64,
#[prost(message, optional, tag = "23")]
pub checkpoint: ::core::option::Option<Checkpoint>,
#[prost(uint32, tag = "24")]
pub weight: u32,
#[prost(string, tag = "25")]
pub periodic_schedule_id: ::prost::alloc::string::String,
#[prost(int64, tag = "26")]
pub periodic_tick_ms: i64,
#[prost(uint32, tag = "27")]
pub unique_replace: u32,
#[prost(int64, tag = "28")]
pub unique_debounce_ms: i64,
#[prost(bool, tag = "29")]
pub unique_exclude_kind: bool,
#[prost(string, repeated, tag = "30")]
pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(bool, tag = "31")]
pub pending: bool,
#[prost(string, tag = "32")]
pub sticky_worker: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Checkpoint {
#[prost(string, tag = "1")]
pub last_completed_step: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub cursor_step: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "3")]
pub cursor: ::prost::alloc::vec::Vec<u8>,
#[prost(int64, tag = "4")]
pub updated_at_ms: i64,
#[prost(uint32, tag = "5")]
pub schema_version: u32,
#[prost(string, tag = "6")]
pub step_set_hash: ::prost::alloc::string::String,
#[prost(map = "string, uint32", tag = "7")]
pub crashes_by_step: ::std::collections::HashMap<
::prost::alloc::string::String,
u32,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AttemptError {
#[prost(uint32, tag = "1")]
pub attempt: u32,
#[prost(int64, tag = "2")]
pub at_ms: i64,
#[prost(string, tag = "3")]
pub message: ::prost::alloc::string::String,
#[prost(enumeration = "Outcome", tag = "4")]
pub outcome: i32,
#[prost(bool, tag = "5")]
pub was_panic: bool,
#[prost(string, tag = "6")]
pub worker: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub step: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Claim {
#[prost(message, optional, tag = "1")]
pub envelope: ::core::option::Option<Envelope>,
#[prost(string, tag = "2")]
pub lease_id: ::prost::alloc::string::String,
#[prost(int64, tag = "3")]
pub lease_expires_at_ms: i64,
#[prost(uint64, tag = "4")]
pub fence: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkerInfo {
#[prost(string, tag = "1")]
pub worker_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub host: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub pid: i32,
#[prost(string, tag = "4")]
pub version: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "5")]
pub queues: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(uint32, tag = "6")]
pub concurrency: u32,
#[prost(int64, tag = "7")]
pub started_at_ms: i64,
#[prost(int64, tag = "8")]
pub heartbeat_at_ms: i64,
#[prost(uint32, tag = "9")]
pub inflight: u32,
#[prost(string, tag = "10")]
pub status: ::prost::alloc::string::String,
#[prost(bool, tag = "11")]
pub duties_active: bool,
#[prost(string, tag = "12")]
pub pending_command: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RateClass {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
pub limit: u64,
#[prost(int64, tag = "3")]
pub window_ms: i64,
#[prost(uint64, tag = "4")]
pub burst: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConcurrencyLimit {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub partition_by: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub max_concurrent: u64,
#[prost(string, tag = "4")]
pub queue: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub on_saturated: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueueStats {
#[prost(string, tag = "1")]
pub queue: ::prost::alloc::string::String,
#[prost(map = "string, uint64", tag = "2")]
pub by_state: ::std::collections::HashMap<::prost::alloc::string::String, u64>,
#[prost(double, tag = "3")]
pub arrival_rate: f64,
#[prost(double, tag = "4")]
pub drain_rate: f64,
#[prost(int64, tag = "5")]
pub time_to_drain_ms: i64,
#[prost(bool, tag = "6")]
pub paused: bool,
#[prost(bool, tag = "7")]
pub count_is_approximate: bool,
#[prost(int64, tag = "8")]
pub oldest_available_ms: i64,
#[prost(message, optional, tag = "9")]
pub quiet_groups: ::core::option::Option<QuietGroupMetrics>,
#[prost(uint32, tag = "10")]
pub weight: u32,
#[prost(uint64, tag = "11")]
pub unfinished_jobs: u64,
#[prost(uint64, optional, tag = "12")]
pub max_unfinished_jobs: ::core::option::Option<u64>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct QuietGroupMetrics {
#[prost(double, tag = "1")]
pub arrival_rate: f64,
#[prost(double, tag = "2")]
pub drain_rate: f64,
#[prost(int64, tag = "3")]
pub time_to_drain_ms: i64,
#[prost(int64, tag = "4")]
pub oldest_available_ms: i64,
#[prost(uint32, tag = "5")]
pub noisy_partitions: u32,
#[prost(bool, tag = "6")]
pub approximate: bool,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Scheduled = 1,
Available = 2,
Running = 3,
Retryable = 4,
Completed = 5,
Archived = 6,
Cancelled = 7,
Quarantined = 8,
Undecodable = 9,
Pending = 10,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "STATE_UNSPECIFIED",
Self::Scheduled => "STATE_SCHEDULED",
Self::Available => "STATE_AVAILABLE",
Self::Running => "STATE_RUNNING",
Self::Retryable => "STATE_RETRYABLE",
Self::Completed => "STATE_COMPLETED",
Self::Archived => "STATE_ARCHIVED",
Self::Cancelled => "STATE_CANCELLED",
Self::Quarantined => "STATE_QUARANTINED",
Self::Undecodable => "STATE_UNDECODABLE",
Self::Pending => "STATE_PENDING",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"STATE_SCHEDULED" => Some(Self::Scheduled),
"STATE_AVAILABLE" => Some(Self::Available),
"STATE_RUNNING" => Some(Self::Running),
"STATE_RETRYABLE" => Some(Self::Retryable),
"STATE_COMPLETED" => Some(Self::Completed),
"STATE_ARCHIVED" => Some(Self::Archived),
"STATE_CANCELLED" => Some(Self::Cancelled),
"STATE_QUARANTINED" => Some(Self::Quarantined),
"STATE_UNDECODABLE" => Some(Self::Undecodable),
"STATE_PENDING" => Some(Self::Pending),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Outcome {
Unspecified = 0,
Success = 1,
Retry = 2,
Skip = 3,
Revoke = 4,
Snooze = 5,
LeaseLost = 6,
Undecodable = 7,
RateLimited = 8,
}
impl Outcome {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "OUTCOME_UNSPECIFIED",
Self::Success => "OUTCOME_SUCCESS",
Self::Retry => "OUTCOME_RETRY",
Self::Skip => "OUTCOME_SKIP",
Self::Revoke => "OUTCOME_REVOKE",
Self::Snooze => "OUTCOME_SNOOZE",
Self::LeaseLost => "OUTCOME_LEASE_LOST",
Self::Undecodable => "OUTCOME_UNDECODABLE",
Self::RateLimited => "OUTCOME_RATE_LIMITED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"OUTCOME_UNSPECIFIED" => Some(Self::Unspecified),
"OUTCOME_SUCCESS" => Some(Self::Success),
"OUTCOME_RETRY" => Some(Self::Retry),
"OUTCOME_SKIP" => Some(Self::Skip),
"OUTCOME_REVOKE" => Some(Self::Revoke),
"OUTCOME_SNOOZE" => Some(Self::Snooze),
"OUTCOME_LEASE_LOST" => Some(Self::LeaseLost),
"OUTCOME_UNDECODABLE" => Some(Self::Undecodable),
"OUTCOME_RATE_LIMITED" => Some(Self::RateLimited),
_ => None,
}
}
}