Struct nacos_sdk::api::naming::ServiceInstance
source · pub struct ServiceInstance {
pub instance_id: Option<String>,
pub ip: String,
pub port: i32,
pub weight: f64,
pub healthy: bool,
pub enabled: bool,
pub ephemeral: bool,
pub cluster_name: Option<String>,
pub service_name: Option<String>,
pub metadata: HashMap<String, String>,
}
Expand description
ServiceInstance for api.
Fields§
§instance_id: Option<String>
§ip: String
§port: i32
§weight: f64
§healthy: bool
§enabled: bool
§ephemeral: bool
§cluster_name: Option<String>
§service_name: Option<String>
§metadata: HashMap<String, String>
Implementations§
source§impl ServiceInstance
impl ServiceInstance
pub fn instance_id(&self) -> Option<&String>
pub fn ip(&self) -> &str
pub fn port(&self) -> i32
pub fn weight(&self) -> f64
pub fn healthy(&self) -> bool
pub fn enabled(&self) -> bool
pub fn ephemeral(&self) -> bool
pub fn cluster_name(&self) -> Option<&String>
pub fn service_name(&self) -> Option<&String>
pub fn metadata(&self) -> &HashMap<String, String>
pub fn ip_and_port(&self) -> String
pub fn is_same_instance(&self, other: &ServiceInstance) -> bool
Trait Implementations§
source§impl Clone for ServiceInstance
impl Clone for ServiceInstance
source§fn clone(&self) -> ServiceInstance
fn clone(&self) -> ServiceInstance
Returns a copy 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 ServiceInstance
impl Debug for ServiceInstance
source§impl Default for ServiceInstance
impl Default for ServiceInstance
source§impl<'de> Deserialize<'de> for ServiceInstance
impl<'de> Deserialize<'de> for ServiceInstance
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 ServiceInstance
impl RefUnwindSafe for ServiceInstance
impl Send for ServiceInstance
impl Sync for ServiceInstance
impl Unpin for ServiceInstance
impl UnwindSafe for ServiceInstance
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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>
Wrap the input message
T
in a tonic::Request