MCPcopy Index your code
hub / github.com/cargo-lambda/cargo-lambda / send_event

Method send_event

crates/cargo-lambda-watch/src/state.rs:291–310  ·  view source on GitHub ↗
(&self, event: NextEvent)

Source from the content-addressed store, hash-verified

289 }
290
291 pub async fn send_event(&self, event: NextEvent) -> Result<(), ServerError> {
292 let events = self.events.lock().await;
293
294 let queue = event.type_queue();
295
296 if let Some(ids) = events.get(queue) {
297 let senders = self.senders.lock().await;
298
299 for id in ids {
300 let name = format!("{id}_{queue}");
301 if let Some(tx) = senders.get(&name) {
302 tx.send(event.clone())
303 .await
304 .map_err(|e| ServerError::SendEventMessage(Box::new(e)))?;
305 }
306 }
307 }
308
309 Ok(())
310 }
311
312 pub async fn clear(&self, extension_id: &str) {
313 let extensions = self.extensions.lock().await;

Callers 4

newFunction · 0.80
runtimeFunction · 0.80
start_function_instanceFunction · 0.80
process_next_requestFunction · 0.80

Calls 3

newFunction · 0.85
type_queueMethod · 0.80
getMethod · 0.80

Tested by

no test coverage detected