pub struct ServerInfo {
pub host: String,
pub pid: i32,
pub server_id: String,
pub concurrency: i32,
pub queues: HashMap<String, i32>,
pub strict_priority: bool,
pub status: String,
pub start_time: Option<Timestamp>,
pub active_worker_count: i32,
}Expand description
ServerInfo holds information about a running server.
Fields§
§host: StringHost machine the server is running on.
pid: i32PID of the server process.
server_id: StringUnique identifier for this server.
concurrency: i32Maximum number of concurrency this server will use.
queues: HashMap<String, i32>List of queue names with their priorities. The server will consume tasks from the queues and prioritize queues with higher priority numbers.
strict_priority: boolIf set, the server will always consume tasks from a queue with higher priority.
status: StringStatus indicates the status of the server.
start_time: Option<Timestamp>Time this server was started.
active_worker_count: i32Number of workers currently processing tasks.
Trait Implementations§
Source§impl Clone for ServerInfo
impl Clone for ServerInfo
Source§impl Default for ServerInfo
impl Default for ServerInfo
Source§impl From<(&HeartbeatMeta, i32)> for ServerInfo
impl From<(&HeartbeatMeta, i32)> for ServerInfo
Source§fn from(value: (&HeartbeatMeta, i32)) -> Self
fn from(value: (&HeartbeatMeta, i32)) -> Self
Converts to this type from the input type.
Source§impl Message for ServerInfo
impl Message for ServerInfo
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.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
Mutably borrows from an owned value. Read more