pub struct ServerInfo {Show 20 fields
pub version: String,
pub supported_protocol_versions: Vec<String>,
pub server_time: SystemTime,
pub restricts_encodings: bool,
pub allowed_encodings: Vec<String>,
pub max_payload_bytes: u64,
pub max_custom_entries: u32,
pub max_custom_total_bytes: u64,
pub max_custom_key_bytes: u32,
pub max_queue_name_bytes: u32,
pub max_job_type_bytes: u32,
pub max_idempotency_key_bytes: u32,
pub max_schedule_horizon: Duration,
pub max_enqueue_batch: u32,
pub max_reserve_batch: u32,
pub max_reserve_queues: u32,
pub max_wait_timeout: Duration,
pub max_lease_duration: Duration,
pub strict_queues: bool,
pub dead_letter_retention_enabled: bool,
}Expand description
The server’s version, capabilities, and limits, as returned by
get_server_info.
The various max_* fields mirror the limits behind the JobRejection
variants. Fetching this once at startup lets a producer validate jobs
locally and avoid round-trips that would only be rejected. The limits are
the server’s defaults; an individual queue may be configured more or less
strictly.
Fields§
§version: StringServer version (a semver string).
supported_protocol_versions: Vec<String>Protocol versions the server supports.
server_time: SystemTimeThe server’s current wall-clock time, useful for detecting clock skew.
restricts_encodings: boolIf true, only encodings in allowed_encodings
are accepted; if false, any encoding is accepted.
allowed_encodings: Vec<String>The accepted encodings when restricts_encodings
is set.
max_payload_bytes: u64Maximum payload size in bytes (→ JobRejection::PayloadTooLarge).
max_custom_entries: u32Maximum entries in the custom map (→ JobRejection::CustomEntriesTooMany).
max_custom_total_bytes: u64Maximum total bytes across the custom map (→ JobRejection::CustomMapTooLarge).
max_custom_key_bytes: u32Maximum bytes in a single custom key (→ JobRejection::CustomKeyTooLong).
max_queue_name_bytes: u32Maximum bytes in a queue name (→ JobRejection::QueueNameTooLong).
max_job_type_bytes: u32Maximum bytes in a job type (→ JobRejection::JobTypeNameTooLong).
max_idempotency_key_bytes: u32Maximum bytes in an idempotency key (→ JobRejection::IdempotencyKeyTooLong).
max_schedule_horizon: DurationHow far ahead a job may be scheduled (→ JobRejection::ScheduledTooFar).
max_enqueue_batch: u32Maximum jobs in one enqueue batch; larger batches fail the whole request.
max_reserve_batch: u32Maximum jobs returned by one reserve; larger requests are clamped, not rejected.
max_reserve_queues: u32Maximum queues one reserve may list; exceeding this is an error.
max_wait_timeout: DurationMaximum long-poll wait; larger requests are clamped.
max_lease_duration: DurationMaximum lease duration; larger requests are clamped.
strict_queues: boolIf true, enqueueing to an undeclared queue is rejected with
JobRejection::UnknownQueue; if false, queues are created on demand.
dead_letter_retention_enabled: boolIf true, the server retains dead-lettered jobs and
drain_dead_letters can return
them; if false, dead jobs are deleted and drain always returns empty.
Trait Implementations§
Source§impl Clone for ServerInfo
impl Clone for ServerInfo
Source§fn clone(&self) -> ServerInfo
fn clone(&self) -> ServerInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ServerInfo
impl Debug for ServerInfo
Source§impl PartialEq for ServerInfo
impl PartialEq for ServerInfo
impl StructuralPartialEq for ServerInfo
Auto Trait Implementations§
impl Freeze for ServerInfo
impl RefUnwindSafe for ServerInfo
impl Send for ServerInfo
impl Sync for ServerInfo
impl Unpin for ServerInfo
impl UnsafeUnpin for ServerInfo
impl UnwindSafe for ServerInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
T in a tonic::Request