MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / notify

Method notify

dstack-util/src/host_api.rs:55–73  ·  view source on GitHub ↗
(&self, event: &str, payload: &str)

Source from the content-addressed store, hash-verified

53 }
54
55 pub async fn notify(&self, event: &str, payload: &str) -> Result<()> {
56 match Platform::detect_or_dstack() {
57 Platform::Dstack => {}
58 Platform::Gcp | Platform::NitroEnclave => {
59 // Skip notify on unsupported platforms
60 return Ok(());
61 }
62 }
63 let Some(client) = &self.client else {
64 return Ok(());
65 };
66 client
67 .notify(Notification {
68 event: event.to_string(),
69 payload: payload.to_string(),
70 })
71 .await?;
72 Ok(())
73 }
74
75 pub async fn notify_q(&self, event: &str, payload: &str) {
76 if let Err(err) = self.notify(event, payload).await {

Callers 4

finishFunction · 0.45
cmd_notify_hostFunction · 0.45
notify_qMethod · 0.45
notify_hostFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected