tidepool_server/lib.rs
1//! Tidepool HTTP + WebSocket JSON-RPC server. Wraps the service
2//! layer's async functions behind an axum front-end.
3//!
4//! Public surface:
5//!
6//! - [`run`] starts the server and blocks until shutdown.
7//! - [`ServerConfig`] holds port, upstream URL, and optional indexed
8//! trees.
9//! - [`HttpUpstream`] is the production [`UpstreamClient`] impl;
10//! consumers building their own servers can import it directly.
11
12#![forbid(unsafe_code)]
13
14pub mod config;
15pub mod dispatcher;
16pub mod http;
17pub mod json_rpc;
18pub mod rest;
19pub mod upstream_http;
20pub mod webhook_runtime;
21pub mod ws;
22
23pub use config::ServerConfig;
24pub use http::run;
25pub use upstream_http::HttpUpstream;
26pub use ws::run_ws;
27
28// Re-export of the service layer's upstream trait so consumers don't
29// have to reach into the service crate just to write their own impl.
30pub use tidepool_rpc::upstream::UpstreamClient;