mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-06 14:41:32 +00:00
* feat: initial support for idm send in daemon * feat: implement IdmClient backend support * feat: daemon idm now uses IdmClient * fix: implement channel destruction propagation * feat: implement request response idm system * feat: implement metrics support * proto: move metrics into GuestMetrics for reusability * fix: log level of guest agent was trace * feat: metrics tree with process information
22 lines
465 B
Rust
22 lines
465 B
Rust
use std::{os::raw::c_int, time::Duration};
|
|
|
|
use anyhow::Result;
|
|
use tokio::time::sleep;
|
|
use xenstore::{XsdClient, XsdInterface};
|
|
|
|
pub mod background;
|
|
pub mod childwait;
|
|
pub mod init;
|
|
pub mod metrics;
|
|
|
|
pub async fn death(code: c_int) -> Result<()> {
|
|
let store = XsdClient::open().await?;
|
|
store
|
|
.write_string("krata/guest/exit-code", &code.to_string())
|
|
.await?;
|
|
drop(store);
|
|
loop {
|
|
sleep(Duration::from_secs(1)).await;
|
|
}
|
|
}
|