summaryrefslogtreecommitdiff
path: root/common/rust/src/payloads.rs
diff options
context:
space:
mode:
Diffstat (limited to 'common/rust/src/payloads.rs')
-rw-r--r--common/rust/src/payloads.rs23
1 files changed, 17 insertions, 6 deletions
diff --git a/common/rust/src/payloads.rs b/common/rust/src/payloads.rs
index 6eb35c8..2da70e3 100644
--- a/common/rust/src/payloads.rs
+++ b/common/rust/src/payloads.rs
@@ -1,15 +1,26 @@
use serde::{Deserialize, Serialize};
+use std::fmt::Debug;
-/// Payload send to the nova cache queues
-#[derive(Serialize, Deserialize, Debug, Clone)]
-#[serde(bound(deserialize = "T: Deserialize<'de> + std::default::Default + Clone"))]
+
+
+/// Data structure sent to the cache component
+/// by the gateway & webhook.
+#[derive(Serialize, Deserialize, Debug)]
+#[serde(bound(deserialize = "T: Deserialize<'de> + Debug"))]
pub struct CachePayload<T> {
+
+ #[serde(rename = "tr")]
pub tracing: Tracing,
- pub data: T
+
+ #[serde(rename = "d")]
+ pub data: T,
+
+ #[serde(rename = "o")]
+ pub operation: String,
}
-#[derive(Serialize, Deserialize, Debug, Clone)]
+#[derive(Serialize, Deserialize, Debug)]
pub struct Tracing {
pub node_id: String,
pub span: Option<String>
-} \ No newline at end of file
+}