dstar_gateway_server/lib.rs
1//! Multi-client D-STAR reflector server.
2//!
3//! Supports all three reflector protocols — `DExtra`, `DPlus`, and
4//! `DCS` — behind a common [`Reflector`] front-end. Each enabled
5//! endpoint runs on its own tokio task and (when
6//! `cross_protocol_forwarding = true` in the config) publishes to a
7//! shared broadcast bus so voice frames received on one protocol
8//! are transcoded and re-broadcast on the other two.
9
10#![cfg_attr(
11 test,
12 allow(
13 clippy::unwrap_used,
14 clippy::panic,
15 clippy::indexing_slicing,
16 clippy::unreachable,
17 )
18)]
19
20pub mod client_pool;
21pub mod reflector;
22pub mod tokio_shell;
23
24pub use client_pool::{
25 ClientHandle, ClientPool, DEFAULT_TX_BUDGET_MAX_TOKENS, DEFAULT_TX_BUDGET_REFILL_PER_SEC,
26 DEFAULT_UNHEALTHY_THRESHOLD, TokenBucket, UnhealthyOutcome,
27};
28pub use reflector::{
29 AccessPolicy, AllowAllAuthorizer, ClientAuthorizer, ConfigError, DenyAllAuthorizer,
30 LinkAttempt, ReadOnlyAuthorizer, Reflector, ReflectorConfig, ReflectorConfigBuilder,
31 RejectReason, StreamCache,
32};
33pub use tokio_shell::{
34 CrossProtocolEvent, EndpointOutcome, FanOutReport, ProtocolEndpoint, ShellError, VoiceEvent,
35 fan_out_voice, fan_out_voice_at, transcode_voice,
36};
37
38// `proptest` is a dev-dependency used by future property tests.
39// Acknowledge it so `-D unused-crate-dependencies` stays quiet until
40// the test file lands.
41#[cfg(test)]
42use proptest as _;
43// `trybuild` is consumed by the compile-fail runner under `tests/`,
44// which is a separate compilation unit from this lib. Acknowledge it
45// here so the dev-dep lint pass stays silent in this crate.
46#[cfg(test)]
47use trybuild as _;
48// `tracing-subscriber` is consumed by the `polaris` binary and the
49// `ref_reflector` example (separate compilation units). Acknowledge
50// here so the lib's `unused-crate-dependencies` lint stays silent.
51use tracing_subscriber as _;