Struct polaris_specification::v1::DestinationSet
source · pub struct DestinationSet {Show 13 fields
pub service: Option<String>,
pub namespace: Option<String>,
pub metadata: HashMap<String, MatchString>,
pub resource: i32,
pub type: i32,
pub scope: i32,
pub metric_window: Option<Duration>,
pub metric_precision: Option<u32>,
pub update_interval: Option<Duration>,
pub recover: Option<RecoverConfig>,
pub policy: Option<CbPolicy>,
pub method: Option<MatchString>,
pub error_codes: Vec<i64>,
}
Expand description
目标set的规则
Fields§
§service: Option<String>
被调命名空间以及服务名,可以为*,代表全匹配
namespace: Option<String>
§metadata: HashMap<String, MatchString>
可选,SUBSET标识
resource: i32
§type: i32
§scope: i32
§metric_window: Option<Duration>
熔断数据度量周期 所有的阈值指标按此周期进行统计
metric_precision: Option<u32>
熔断数据统计精度,决定数据度量的最小周期 度量滑窗的步长=window/precision
update_interval: Option<Duration>
熔断数据上报周期,对分布式熔断有效
recover: Option<RecoverConfig>
触发熔断后恢复配置
policy: Option<CbPolicy>
熔断策略
method: Option<MatchString>
被调的接口信息,指定哪些接口会使用该规则
error_codes: Vec<i64>
返回码,指定哪些返回码会使用该规则
Implementations§
source§impl DestinationSet
impl DestinationSet
sourcepub fn resource(&self) -> Resource
pub fn resource(&self) -> Resource
Returns the enum value of resource
, or the default if the field is set to an invalid enum value.
sourcepub fn set_resource(&mut self, value: Resource)
pub fn set_resource(&mut self, value: Resource)
Sets resource
to the provided enum value.
sourcepub fn type(&self) -> Type
pub fn type(&self) -> Type
Returns the enum value of type
, or the default if the field is set to an invalid enum value.
Trait Implementations§
source§impl Clone for DestinationSet
impl Clone for DestinationSet
source§fn clone(&self) -> DestinationSet
fn clone(&self) -> DestinationSet
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 DestinationSet
impl Debug for DestinationSet
source§impl Default for DestinationSet
impl Default for DestinationSet
source§impl Message for DestinationSet
impl Message for DestinationSet
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<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, Self: Sized,
Encodes the message to a buffer. Read more
source§fn encode_to_vec(&self) -> Vec<u8, Global>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8, Global>where Self: Sized,
Encodes the message to a newly allocated buffer.
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where B: BufMut, Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>where Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where B: Buf, Self: Default,
Decodes an instance of the message from a buffer. Read more
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where B: Buf, Self: Default,
Decodes a length-delimited instance of the message from the buffer.
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self
. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where B: Buf, Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.source§impl PartialEq<DestinationSet> for DestinationSet
impl PartialEq<DestinationSet> for DestinationSet
source§fn eq(&self, other: &DestinationSet) -> bool
fn eq(&self, other: &DestinationSet) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.