pub struct ServiceRegistration {
pub name: String,
pub addr: SocketAddr,
pub metadata: HashMap<String, String>,
pub tags: Vec<String>,
pub weight: u32,
pub heartbeat_interval: Duration,
pub health_check: Option<HealthCheckConfig>,
}Expand description
服务注册配置
Fields§
§name: String服务名称
addr: SocketAddr服务地址
metadata: HashMap<String, String>服务元数据
服务标签
weight: u32服务权重
heartbeat_interval: Duration心跳间隔
health_check: Option<HealthCheckConfig>健康检查配置
Trait Implementations§
Source§impl Clone for ServiceRegistration
impl Clone for ServiceRegistration
Source§fn clone(&self) -> ServiceRegistration
fn clone(&self) -> ServiceRegistration
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServiceRegistration
impl Debug for ServiceRegistration
Source§impl Default for ServiceRegistration
impl Default for ServiceRegistration
Source§impl<'de> Deserialize<'de> for ServiceRegistration
impl<'de> Deserialize<'de> for ServiceRegistration
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ServiceRegistration
impl RefUnwindSafe for ServiceRegistration
impl Send for ServiceRegistration
impl Sync for ServiceRegistration
impl Unpin for ServiceRegistration
impl UnsafeUnpin for ServiceRegistration
impl UnwindSafe for ServiceRegistration
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