Constellation, Spacedust, Slingshot, UFOs: atproto crates and services for microcosm

add "origin" to events (replay, live, backfill)

just to make more source-like terminology happen

Changed files
+4 -2
spacedust
+3 -2
spacedust/src/lib.rs
···
#[derive(Debug, Serialize)]
#[serde(rename_all="snake_case")]
pub struct ClientEvent {
-
kind: String,
+
kind: String, // "link"
+
origin: String, // "live", "replay", "backfill"
link: ClientLinkEvent,
}
#[derive(Debug, Serialize)]
struct ClientLinkEvent {
-
operation: String,
+
operation: String, // "create", "delete" (prob no update, though maybe for rev?)
source: String,
source_record: String,
source_rev: String,
+1
spacedust/src/subscriber.rs
···
let ev = ClientEvent {
kind: "link".to_string(),
+
origin: "live".to_string(),
link: link.into(),
};
let json = serde_json::to_string(&ev)?;