pub struct EngineConfig {
pub storage: NativeStorage,
pub http: NativeHttp,
pub uploader: SharedFileUploader,
pub event_sink: NativeEventSink,
pub metrics: Arc<dyn AsyncMetricSink>,
pub max_http_inflight: usize,
}Expand description
事件泵配置(native 具体 ports 聚合)。
装配后由 run_engine_loop / run_engine_loop_with_transports 转成 host 的
EngineDeps(注入 NativeClock),调泛型壳 helix_driver_host::engine::run_engine_loop。
Fields§
§storage: NativeStorage§http: NativeHttp§uploader: SharedFileUploader§event_sink: NativeEventSink§metrics: Arc<dyn AsyncMetricSink>Engine 热路径指标 sink;composition root 应与 HTTP/WS/Storage/Event 共用同一 Arc。
max_http_inflight: usizeHttp effect 并发上限(Http BoundedSpawner 的 worker 数 N)。
冷启动时 core 一步可吐 N 条 Effect::Http;若全部齐发会瞬间打满底层连接
(reqwest pool 不限制新连接并发)。此字段 = Http/HttpFire BoundedSpawner 的常驻
worker 数:第 N+1 条请求在有界队列里等 worker,不并发齐发。host(ambient API 合法落点)
读 env 注入;建议默认 8。0 会被 .max(1) 兜底为 1。
Implementations§
Source§impl EngineConfig
impl EngineConfig
pub fn new( storage: NativeStorage, http: NativeHttp, uploader: SharedFileUploader, event_sink: NativeEventSink, max_http_inflight: usize, ) -> Self
pub fn with_metric_sink(self, metrics: Arc<dyn AsyncMetricSink>) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for EngineConfig
impl !UnwindSafe for EngineConfig
impl Freeze for EngineConfig
impl Send for EngineConfig
impl Sync for EngineConfig
impl Unpin for EngineConfig
impl UnsafeUnpin for EngineConfig
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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