Server tools to backfill, tail, mirror, and verify PLC logs

cleaner doc example code

+3 -10
+3 -1
examples/poll.rs
··· 27 27 if op.did == "did:plc:hdhoaan3xa3jiuq4fg4mefid" { 28 28 println!( 29 29 "Update found for {}! cid={}\n -> operation: {}", 30 - op.did, op.cid, op.operation.get() 30 + op.did, 31 + op.cid, 32 + op.operation.get() 31 33 ); 32 34 } 33 35 }
-9
src/poll.rs
··· 175 175 /// # async fn main() { 176 176 /// use allegedly::{ExportPage, Op, poll_upstream}; 177 177 /// 178 - /// // set to `None` to replay from the beginning of the PLC history 179 178 /// let after = Some(chrono::Utc::now()); 180 - /// 181 - /// // the PLC server to poll for new ops 182 179 /// let upstream = "https://plc.wtf/export".parse().unwrap(); 183 - /// 184 - /// // self-rate-limit (plc.directory's limit interval is 600ms) 185 180 /// let throttle = std::time::Duration::from_millis(300); 186 181 /// 187 - /// // pages are sent out of the poller via a tokio mpsc channel 188 182 /// let (tx, mut rx) = tokio::sync::mpsc::channel(1); 189 - /// 190 - /// // spawn a tokio task to run the poller 191 183 /// tokio::task::spawn(poll_upstream(after, upstream, throttle, tx)); 192 184 /// 193 - /// // receive pages of plc ops from the poller 194 185 /// while let Some(ExportPage { ops }) = rx.recv().await { 195 186 /// println!("received {} plc ops", ops.len()); 196 187 ///