Skip to content

Commit

Permalink
consolidate polling into a single global polling interval, add some l…
Browse files Browse the repository at this point in the history
…ogic to fetch records after signal
  • Loading branch information
matthme committed Nov 7, 2024
1 parent bca7f06 commit 3dc8e43
Show file tree
Hide file tree
Showing 7 changed files with 598 additions and 208 deletions.
422 changes: 263 additions & 159 deletions dnas/generic_dna/zomes/coordinator/generic_zome/src/api.rs

Large diffs are not rendered by default.

25 changes: 19 additions & 6 deletions dnas/generic_dna/zomes/coordinator/generic_zome/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ pub fn init() -> ExternResult<InitCallbackResult> {
Ok(InitCallbackResult::Pass)
}

#[derive(Serialize, Deserialize, Debug)]
#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct NodeLink {
src: NodeId,
dst: NodeId,
tag: Option<Vec<u8>>,
create_action_hash: ActionHash,
}

#[derive(Serialize, Deserialize, Clone, Debug)]
Expand All @@ -47,11 +48,23 @@ pub enum Signal {
#[derive(Serialize, Deserialize, Debug)]
#[serde(tag = "type")]
pub enum SignalKind {
ThingCreated { thing: Thing },
ThingUpdated { thing: Thing },
ThingDeleted { id: ActionHash },
LinksCreated { links: Vec<NodeLink> },
LinksDeleted { links: Vec<NodeLink> },
ThingCreated {
thing: Thing,
},
ThingUpdated {
thing: Thing,
update_action_hash: ActionHash,
update_link_action_hash: ActionHash,
},
ThingDeleted {
id: ActionHash,
},
LinksCreated {
links: Vec<NodeLink>,
},
LinksDeleted {
links: Vec<NodeLink>,
},
}

#[derive(Serialize, Deserialize, Debug)]
Expand Down
Loading

0 comments on commit 3dc8e43

Please sign in to comment.