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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
//! Specialized types for Redis Enterprise API objects
use serde::{Deserialize, Serialize};
use serde_json::Value;
/// Database group - represents a group of databases sharing a memory pool
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct BdbGroup {
/// Unique identifier (read-only).
pub uid: u32,
/// Memory pool size in bytes.
pub memory_size: u64,
/// List of member database UIDs.
pub members: Vec<u32>,
}
/// Database connections auditing configuration
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DbConnsAuditingConfig {
/// Audit protocol (e.g. `"TCP"`, `"syslog"`).
pub audit_protocol: String,
/// Audit collector address.
pub audit_address: String,
/// Audit collector port.
pub audit_port: u16,
/// Reconnect interval in seconds.
pub audit_reconnect_interval: Option<u32>,
/// Maximum number of reconnect attempts.
pub audit_reconnect_max_attempts: Option<u32>,
}
/// Cluster check result for diagnostics
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CheckResult {
/// Overall cluster test result (e.g. `"PASS"`, `"FAIL"`).
pub cluster_test_result: Option<String>,
/// Per-node check results. See [`NodeCheckResult`].
pub nodes: Option<Vec<NodeCheckResult>>,
}
/// Node check result for diagnostics
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct NodeCheckResult {
/// Node UID.
pub node_uid: u32,
/// Check status.
pub status: String,
/// List of individual checks performed on the node.
pub checks: Option<Vec<Value>>,
}
/// Services configuration
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ServicesConfiguration {
/// Cluster manager (CM) server configuration. See [`ServiceConfig`].
pub cm_server: Option<ServiceConfig>,
/// CRDB coordinator configuration. See [`ServiceConfig`].
pub crdb_coordinator: Option<ServiceConfig>,
/// CRDB worker configuration. See [`ServiceConfig`].
pub crdb_worker: Option<ServiceConfig>,
/// mDNS server configuration. See [`ServiceConfig`].
pub mdns_server: Option<ServiceConfig>,
/// PowerDNS server configuration. See [`ServiceConfig`].
pub pdns_server: Option<ServiceConfig>,
/// Redis server configuration. See [`ServiceConfig`].
pub redis_server: Option<ServiceConfig>,
/// saslauthd service configuration. See [`ServiceConfig`].
pub saslauthd: Option<ServiceConfig>,
/// Stats archiver service configuration. See [`ServiceConfig`].
pub stats_archiver: Option<ServiceConfig>,
}
/// Individual service configuration
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ServiceConfig {
/// Whether the service is enabled.
pub enabled: bool,
/// Port the service listens on.
pub port: Option<u16>,
/// Service-specific settings (free-form).
pub settings: Option<Value>,
}
/// OCSP (Online Certificate Status Protocol) configuration
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct OcspConfig {
/// OCSP responder URL.
pub ocsp_url: String,
/// OCSP response timeout in seconds.
pub ocsp_response_timeout_seconds: Option<u32>,
/// OCSP query frequency in seconds.
pub query_frequency_seconds: Option<u32>,
/// OCSP recovery query frequency in seconds.
pub recovery_frequency_seconds: Option<u32>,
/// Maximum number of OCSP recovery attempts.
pub recovery_max_tries: Option<u32>,
/// OCSP responder certificate (PEM).
pub responder_cert: Option<String>,
}
/// OCSP status information
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct OcspStatus {
/// Name of the certificate.
pub cert_name: String,
/// OCSP status (e.g. `"good"`, `"revoked"`).
pub ocsp_status: String,
/// Timestamp when the OCSP response was produced (ISO-8601).
pub produced_at: Option<String>,
/// URL of the OCSP responder.
pub responder_url: Option<String>,
/// Timestamp of the current update (ISO-8601).
pub this_update: Option<String>,
/// Timestamp of the next scheduled update (ISO-8601).
pub next_update: Option<String>,
}
/// JWT authorization configuration
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct JwtAuthorize {
/// JSON Web Key Set (JWKS) URI used to verify JWTs.
pub jwks_uri: String,
}
/// State machine status (for long-running operations)
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct StateMachine {
/// State machine ID.
pub id: String,
/// State machine name.
pub name: String,
/// Current state.
pub state: String,
/// Check status.
pub status: String,
/// Percent progress (0–100).
pub progress: Option<f64>,
/// Creation timestamp (ISO-8601).
pub created: Option<String>,
/// Last update timestamp (ISO-8601).
pub updated: Option<String>,
/// Error message if the state machine failed.
pub error: Option<String>,
}
/// Module metadata information
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ModuleMetadata {
/// State machine name.
pub name: String,
/// Module version.
pub version: String,
/// Semantic version string.
pub semantic_version: Option<String>,
/// Minimum compatible Redis version.
pub min_redis_version: Option<String>,
/// Minimum compatible Redis Enterprise version.
pub min_redis_pack_version: Option<String>,
/// List of capability names exposed by the module.
pub capabilities: Option<Vec<String>>,
/// Default command-line arguments.
pub command_line_args: Option<String>,
/// Configuration command exposed by the module.
pub config_command: Option<String>,
/// List of module dependencies.
pub dependencies: Option<Vec<String>>,
/// Human-readable description.
pub description: Option<String>,
/// Display name shown in the UI.
pub display_name: Option<String>,
/// Maintainer email address.
pub email: Option<String>,
/// Module homepage URL.
pub homepage: Option<String>,
/// Whether the module ships bundled with Redis Enterprise.
pub is_bundled: Option<bool>,
/// Module license identifier.
pub license: Option<String>,
/// Supported operating systems.
pub os_list: Option<Vec<String>>,
/// SHA-256 checksum of the module package.
pub sha256: Option<String>,
/// Unique identifier (read-only).
pub uid: Option<String>,
/// Supported CPU architectures.
pub architecture_list: Option<Vec<String>>,
/// Module author name.
pub author: Option<String>,
}
/// Database command statistics
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DbCommand {
/// Redis command name.
pub command: String,
/// Number of times the command has been executed.
pub count: u64,
}
/// Action v2 - enhanced action tracking
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ActionV2 {
/// Action unique identifier (read-only).
pub action_uid: String,
/// State machine name.
pub name: String,
/// Action type (e.g. `"backup"`, `"restore"`).
pub action_type: String,
/// Unix-epoch timestamp when the action was created.
pub creation_time: u64,
/// Percent progress (0–100).
pub progress: f64,
/// Check status.
pub status: String,
/// Additional action information. See [`ActionAdditionalInfo`].
pub additional_info: Option<ActionAdditionalInfo>,
}
/// Additional info for ActionV2
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ActionAdditionalInfo {
/// Human-readable description.
pub description: Option<String>,
/// Error message if the state machine failed.
pub error: Option<String>,
/// Type of object the action operates on (e.g. `"bdb"`, `"node"`).
pub object_type: Option<String>,
/// UID of the object the action operates on.
pub object_uid: Option<String>,
}
// Types are already public, no need for re-export