summaryrefslogtreecommitdiff
path: root/common/rust/src/payloads.rs
blob: 5c12c7a572a34b194c4b735057b6ffe25575be73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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 {
    pub tracing: Tracing,
    pub data: CacheData,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Tracing {
    pub node_id: String,
    pub span: Option<String>,
}

#[derive(Serialize, Deserialize, Debug, Clone)]
pub enum CacheData {
    Ready {},
}

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct ReadyCacheData {
    pub version: u8,
}