[relay] Wake-up: a push endpoint per mailbox, and a constant wake to it when a blob arrives
ci / check (pull_request) Has been cancelled

This commit is contained in:
2026-11-20 12:04:55 +01:00
parent f075fae0e3
commit f852b1a6d1
21 changed files with 1606 additions and 40 deletions
+7 -2
View File
@@ -1,5 +1,5 @@
//! `tabellarius-relay [--listen 127.0.0.1:8470] [--db tabellarius-relay.db] [--max-bytes N]
//! [--max-mailboxes N] [--max-invites N]`
//! [--max-mailboxes N] [--max-invites N] [--push-loopback]`
//!
//! Prints one line at start (version and address) and nothing per request.
@@ -8,6 +8,7 @@ use std::time::{Duration, SystemTime, UNIX_EPOCH};
use tabellarius_relay::http::{router, AppState, Clock};
use tabellarius_relay::parse_args;
use tabellarius_relay::store::Store;
use tabellarius_relay::wake::Waker;
fn now() -> i64 {
SystemTime::now()
@@ -63,7 +64,11 @@ async fn main() {
});
let clock: Clock = Arc::new(now);
let app = router(AppState { store, clock });
let app = router(AppState::with_waker(
store,
clock,
Waker::new(args.push_loopback),
));
let shutdown = async {
let _ = tokio::signal::ctrl_c().await;
};