reduct_base/msg/
replication_api.rs1use crate::msg::diagnostics::Diagnostics;
6use crate::Labels;
7use serde::{Deserialize, Serialize};
8use serde_json::Value;
9
10#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Default)]
12pub struct ReplicationSettings {
13 pub src_bucket: String,
15 pub dst_bucket: String,
17 pub dst_host: String,
19 pub dst_token: Option<String>,
21 #[serde(default)]
23 pub entries: Vec<String>,
24 #[serde(default)]
26 pub include: Labels,
27 #[serde(default)]
29 pub exclude: Labels,
30 #[serde(default)]
32 pub each_n: Option<u64>,
33 #[serde(default)]
35 pub each_s: Option<f64>,
36 #[serde(default)]
38 pub when: Option<Value>,
39}
40
41#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
43pub struct ReplicationInfo {
44 pub name: String,
46 pub is_active: bool,
48 pub is_provisioned: bool,
50 pub pending_records: u64,
52}
53
54#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Default)]
56pub struct ReplicationList {
57 pub replications: Vec<ReplicationInfo>,
59}
60
61#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
63pub struct FullReplicationInfo {
64 pub info: ReplicationInfo,
66 pub settings: ReplicationSettings,
68 pub diagnostics: Diagnostics,
70}