aboutsummaryrefslogtreecommitdiff
path: root/crates/whirl_api/src/routes/stats/structures.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-05-20 17:05:59 +0000
committerFuwn <[email protected]>2021-05-20 17:05:59 +0000
commit9dbc613765de8ab7dfa8e1374cf6661dcfd56bc8 (patch)
tree8cfff6a23bb72db2660e68c63a8cf9d0539a061f /crates/whirl_api/src/routes/stats/structures.rs
parentfeat(readme): add sqlfluff as a dev dep (diff)
downloadwhirl-9dbc613765de8ab7dfa8e1374cf6661dcfd56bc8.tar.xz
whirl-9dbc613765de8ab7dfa8e1374cf6661dcfd56bc8.zip
refactor(global): move crates around, stricter module isolation
Diffstat (limited to 'crates/whirl_api/src/routes/stats/structures.rs')
-rw-r--r--crates/whirl_api/src/routes/stats/structures.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/crates/whirl_api/src/routes/stats/structures.rs b/crates/whirl_api/src/routes/stats/structures.rs
new file mode 100644
index 0000000..88fc852
--- /dev/null
+++ b/crates/whirl_api/src/routes/stats/structures.rs
@@ -0,0 +1,21 @@
+// Copyleft (ɔ) 2021-2021 The Whirlsplash Collective
+// SPDX-License-Identifier: GPL-3.0-only
+
+#[derive(Serialize)]
+pub struct Statistics {
+ pub system: StatisticsSystem,
+ pub process: StatisticsProcess,
+}
+#[derive(Serialize)]
+pub struct StatisticsSystem {
+ #[serde(rename = "type")]
+ pub os_type: String,
+ pub release: String,
+ pub uptime: String,
+}
+#[derive(Serialize)]
+pub struct StatisticsProcess {
+ pub memory_usage: String,
+ pub cpu_usage: String,
+ // pub uptime: String,
+}