pub struct GrpcPushBroadcaster { /* private fields */ }Expand description
gRPC 推送广播器
实现 ExternalPushSink trait,接收 PushDispatcher 的推送事件,
通过 broadcast channel 分发给所有 SubscribePush 流式连接。
Implementations§
Trait Implementations§
Source§impl Clone for GrpcPushBroadcaster
impl Clone for GrpcPushBroadcaster
Source§fn clone(&self) -> GrpcPushBroadcaster
fn clone(&self) -> GrpcPushBroadcaster
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 ExternalPushSink for GrpcPushBroadcaster
impl ExternalPushSink for GrpcPushBroadcaster
Source§fn on_quote_push(
&self,
sec_key: &str,
sub_type: i32,
rehab_type: i32,
proto_id: u32,
body: &[u8],
)
fn on_quote_push( &self, sec_key: &str, sub_type: i32, rehab_type: i32, proto_id: u32, body: &[u8], )
v1.4.106 codex 1131 F4 [P1]: rehab_type 透传到 gRPC PushEvent.
gRPC 当前 broadcast 模型 (所有 qot:read subscriber 收到所有 quote
event), per-conn (sec_key, sub_type, rehab_type) 三元 filter 是 raw TCP
专属. rehab_type 通过 PushEvent 让客户端可见.
Source§fn on_trade_push(
&self,
acc_id: u64,
proto_id: u32,
body: &[u8],
trd_market: Option<&str>,
)
fn on_trade_push( &self, acc_id: u64, proto_id: u32, body: &[u8], trd_market: Option<&str>, )
v1.4.105 D3 (Phase 4) T-B3: trade push trd_market 由 PushDispatcher 一 次 decode 后透传, 不再各 sink 独立 decode body. 空 / unknown → 空 字符串 (PushEvent proto3 默认值, 老 client 解析兼容).
Source§fn on_broadcast_push(&self, proto_id: u32, body: &[u8])
fn on_broadcast_push(&self, proto_id: u32, body: &[u8])
广播推送 (到价提醒、系统通知等)
Auto Trait Implementations§
impl Freeze for GrpcPushBroadcaster
impl !RefUnwindSafe for GrpcPushBroadcaster
impl Send for GrpcPushBroadcaster
impl Sync for GrpcPushBroadcaster
impl Unpin for GrpcPushBroadcaster
impl UnsafeUnpin for GrpcPushBroadcaster
impl !UnwindSafe for GrpcPushBroadcaster
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].