Method
subscribe
(&self, sender: Sender<Event<VectorId, Vector>>)
Source from the content-addressed store, hash-verified
| 76 | /// subscribe to Reporter |
| 77 | #[inline] |
| 78 | pub async fn subscribe(&self, sender: Sender<Event<VectorId, Vector>>) -> Result<(), SessionResult> { |
| 79 | if self.off_reporter { |
| 80 | return Err(SessionResult::Err(StatusResult::ReporterIsOff)); |
| 81 | } |
| 82 | |
| 83 | // Send to Reporter |
| 84 | let _ = self |
| 85 | .reporter_session |
| 86 | .dispatch(Event::Subscribed(sender.clone())) |
| 87 | .await; |
| 88 | |
| 89 | self.reporter_session.register(sender).await |
| 90 | } |
| 91 | |
| 92 | /// insert to storage and persist to disk |
| 93 | #[inline] |
Callers
nothing calls this directly
Tested by
no test coverage detected