pub enum BackendKind {
Rdbms = 0,
Cache = 1,
Search = 2,
Graph = 3,
Document = 4,
Storage = 5,
Tsdb = 6,
}Expand description
出站调用的后端类别,用于把超时计数分维度 —— 否则只有一个总数,看不出是哪个后端在出事。
判别值即 TIMEOUTS 的下标,顺序不可改。
§选哪个维度:跟 trait 家族走,不跟产品品类走
一个产品可以同时属于两个家族:ClickHouse 既实现 SqlExecutor / RdbmsClient
(错误类型 RdbmsError)又实现 TsdbClient(错误类型 Error)。
判据是调用点包着哪个 trait:
| 调用点包的 trait | kind |
|---|---|
SqlExecutor / RdbmsClient | Rdbms |
Cache | Cache |
SearchClient | Search |
GraphClient | Graph |
DocumentClient | Document |
StorageClient | Storage |
TsdbClient | Tsdb |
只有 Rdbms 维度被 ecat-data-sqlx / ecat-data-mssql 的 metrics 读成
ecat_rdbms_query_timeout_total:走 SqlExecutor 的调用点若错填 Tsdb,
该指标会静默少数。E: TimeoutError 与 kind 是互相独立的两个轴
(Tsdb + RdbmsError 照样编译),所以没有编译期保护 —— 只能靠这条
判据加评审。
Variants§
Implementations§
Trait Implementations§
Source§impl Clone for BackendKind
impl Clone for BackendKind
impl Copy for BackendKind
Source§impl Debug for BackendKind
impl Debug for BackendKind
impl Eq for BackendKind
Source§impl PartialEq for BackendKind
impl PartialEq for BackendKind
impl StructuralPartialEq for BackendKind
Auto Trait Implementations§
impl Freeze for BackendKind
impl RefUnwindSafe for BackendKind
impl Send for BackendKind
impl Sync for BackendKind
impl Unpin for BackendKind
impl UnsafeUnpin for BackendKind
impl UnwindSafe for BackendKind
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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