aboutsummaryrefslogtreecommitdiffstats
path: root/src/swarm
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-07 22:35:09 +0100
committertv <tv@krebsco.de>2026-11-07 22:35:09 +0100
commit1458ea92a41788a0f33e86e621817613f46055eb (patch)
tree8cbe202657c5f9eb006b9612d9dfa0a4b829d589 /src/swarm
parentaea80cf1bfa39f17dbbd0b4782a71fca81e09f74 (diff)
dashboard: own links over the API, and CORS
GET /admin/dashboard/links/own and its event stream: a node's own links, as LINKS_REPLY carried them, for other members' dashboards with a token. CORS for the members' dashboard origins and --cors-origins, without credentials. Auth plan M3.
Diffstat (limited to 'src/swarm')
-rw-r--r--src/swarm/links.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/swarm/links.rs b/src/swarm/links.rs
index ea5564e..2234783 100644
--- a/src/swarm/links.rs
+++ b/src/swarm/links.rs
@@ -1019,7 +1019,7 @@ pub(crate) async fn watch(state: AppState) {
/// dormancy, a round trip measured or moved by more than a fifth (and 1 ms), or a clock
/// measured or moved beyond both bounds. Round trips and clock samples wobble; small
/// moves aren't news.
-fn changed(old: &[Link], new: &[Link]) -> bool {
+pub(crate) fn changed(old: &[Link], new: &[Link]) -> bool {
let clock_moved = |a: Option<ClockOffset>, b: Option<ClockOffset>| match (a, b) {
(Some(a), Some(b)) => {
a.offset_ms.abs_diff(b.offset_ms) > a.within_ms.saturating_add(b.within_ms)