Expand description
QUIC transport for Chirps v0.4 with priority scheduling, retransmission, QoS, and versioned handshakes.
Key concepts:
StreamKindmodels control, gossip, user, Raft, and snapshot streams with per-kind priority.QosControllerapplies backpressure and bandwidth throttling (e.g., snapshot token bucket).RetransmissionBufferretains in-flight frames for reconnect replay with sequence/ack handling.ExtendedTransportMetricsexposes counters and latency histograms.HandshakeMessageenforces protocol versions and negotiates capabilities.
Use QuicBackend via the MessageBackend trait to send/broadcast frames and subscribe to incoming messages.
Structs§
- Bandwidth
Config - 帯域・スロットルの設定。snapshot_bandwidth_limit は RaftSnapshot に適用する帯域上限 (デフォルト 50MB/s)。
- Buffer
Stats - Buffered
Message - Capabilities
- Certificate
Cache Stats - Extended
Transport Metrics - Live metrics registry with atomic counters and per-stream latency histograms.
- Handshake
Config - ハンドシェイクのタイムアウト・互換性チェック設定。
- Handshake
Message - Latency
Snapshot - Metrics
Snapshot - Read-only snapshot of transport counters and latency histograms.
- Negotiated
Capabilities - Priority
Config - 優先度制御の基本パラメータ。weights は [High, Normal, Low] の順でデフォルト [4,2,1]。
- QosConfig
- QoS とバックプレッシャーの設定。bandwidth と queue_limits を内包する。
- QosController
- Per-stream QoS manager that applies backpressure, snapshot throttling, and priority scheduling.
- QosMetrics
- Queue
Limits - ストリーム種別ごとのキュー上限。Raft/Control/Snapshot は raft_* を共有。
- Quic
Backend - QUIC transport backend implementing the
MessageBackendtrait with QoS, retransmission, and versioned handshakes. - Receive
Handler - Retransmission
Buffer - Retransmit
Config - 再送バッファの容量制御設定。デフォルトは 32MB / 10,000 件 / TTL 60 秒。
- Telemetry
Config - Token
Bucket - Simple token bucket used for snapshot throttling (expanded in Task 6).
- Transport
Config V04 - Chirps v0.4 向けのトランスポート設定集。
- Transport
Metrics Snapshot
Enums§
- Buffer
Error - Early
Data Policy - Replay policy for QUIC early data.
- Handshake
Error - LogFormat
- QosError
- Stream
Kind - Transport stream categories with priority and reliability semantics.
- Transport
Event - トランスポートで観測する構造化イベント。
Constants§
- DEFAULT_
MAX_ CONNECTIONS - FILE_
TRANSFER_ CONNECTION_ RECEIVE_ WINDOW_ BYTES - FILE_
TRANSFER_ MAX_ CONCURRENT_ UNI_ STREAMS - FILE_
TRANSFER_ SEND_ WINDOW_ BYTES - FILE_
TRANSFER_ STREAM_ RECEIVE_ WINDOW_ BYTES - Flow-control values used by the v0.5.2 File Transfer performance profile.
- MIN_
COMPATIBLE_ VERSION - PROTOCOL_
VERSION
Functions§
- certificate_
cache_ stats - emit_
event - イベントをtracingの構造化フィールドとして出力する。
- init_
metrics - Initialize global metrics recorder. When
metrics-exportfeature is enabled, optionally install a Prometheus exporter and return its handle. - init_
test_ tracing - Initialize tracing for tests; ignores double-init errors.
- init_
tracing - Initialize tracing subscriber with given config. Idempotent.
- negotiate