diff options
| author | n1c00o <git.n1c00o@gmail.com> | 2021-10-01 17:15:47 +0200 |
|---|---|---|
| committer | n1c00o <git.n1c00o@gmail.com> | 2021-10-01 17:15:47 +0200 |
| commit | 9b4d9b4feb99a5ec77a608dddec5999326abf8fa (patch) | |
| tree | 8f97a198d8f1fa2f19d99e42e9d15dd1b0a772e6 | |
| parent | 359c3b277a50fd622786dc962afaaf78ed6d8883 (diff) | |
Start doing structs for NATS
| -rw-r--r-- | common/rust/src/payloads.rs | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/common/rust/src/payloads.rs b/common/rust/src/payloads.rs index 6eb35c8..5c12c7a 100644 --- a/common/rust/src/payloads.rs +++ b/common/rust/src/payloads.rs @@ -3,13 +3,23 @@ use serde::{Deserialize, Serialize}; /// Payload send to the nova cache queues #[derive(Serialize, Deserialize, Debug, Clone)] #[serde(bound(deserialize = "T: Deserialize<'de> + std::default::Default + Clone"))] -pub struct CachePayload<T> { +pub struct CachePayload { pub tracing: Tracing, - pub data: T + pub data: CacheData, } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct Tracing { pub node_id: String, - pub span: Option<String> -}
\ No newline at end of file + pub span: Option<String>, +} + +#[derive(Serialize, Deserialize, Debug, Clone)] +pub enum CacheData { + Ready {}, +} + +#[derive(Serialize, Deserialize, Debug, Clone)] +pub struct ReadyCacheData { + pub version: u8, +} |
