Skip to main content

tsoracle_server/
lib.rs

1//
2//  ░▀█▀░█▀▀░█▀█░█▀▄░█▀█░█▀▀░█░░░█▀▀
3//  ░░█░░▀▀█░█░█░█▀▄░█▀█░█░░░█░░░█▀▀
4//  ░░▀░░▀▀▀░▀▀▀░▀░▀░▀░▀░▀▀▀░▀▀▀░▀▀▀
5//
6//  tsoracle — Distributed Timestamp Oracle
7//  https://www.tsoracle.rs
8//
9//  Copyright (c) 2026 Prisma Risk
10//
11//  Licensed under the Apache License, Version 2.0 (the "License");
12//  you may not use this file except in compliance with the License.
13//  You may obtain a copy of the License at
14//
15//      https://www.apache.org/licenses/LICENSE-2.0
16//
17//  Unless required by applicable law or agreed to in writing, software
18//  distributed under the License is distributed on an "AS IS" BASIS,
19//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20//  See the License for the specific language governing permissions and
21//  limitations under the License.
22//
23
24#![doc = include_str!("../README.md")]
25// Panic policy (see CONTRIBUTING.md). `cfg_attr(not(test), ...)` skips the lint
26// for the lib's own unit tests; integration tests are separate compilation units.
27#![cfg_attr(not(test), warn(clippy::unwrap_used, clippy::expect_used))]
28
29mod bt;
30mod clock;
31mod fence;
32#[cfg(feature = "tracing")]
33pub(crate) mod heartbeat;
34mod leader_hint;
35mod persist_disposition;
36pub(crate) mod reporter;
37mod server;
38mod service;
39mod serving_core;
40mod signal;
41
42pub mod docs;
43
44pub use crate::reporter::Reporter;
45pub use bt::Bt;
46pub use clock::{Clock, SystemClock};
47pub use server::{BuildError, Server, ServerBuilder, ServerError, ServingState, WatchGuard};
48pub use signal::shutdown_signal;
49
50#[cfg(any(test, feature = "test-fakes"))]
51pub mod test_fakes;
52
53#[cfg(any(test, feature = "test-support"))]
54pub mod test_support;
55
56#[doc(hidden)]
57pub use leader_hint::decode_leader_hint as __priv_decode_leader_hint;