feat(hostd): varlink interfaced host controller to manage machine configuration and boot mgmt

This commit is contained in:
Lars Sjöström 2025-01-08 11:09:34 +01:00
parent 8e99ab4555
commit 90d7c9092a
No known key found for this signature in database
12 changed files with 721 additions and 18 deletions
hostd/src

17
hostd/src/api.rs Normal file
View file

@ -0,0 +1,17 @@
use anyhow::Result;
use dropshot::ApiDescription;
use std::sync::Arc;
use crate::context::ControllerContext;
use crate::machine;
use crate::sysupdate;
type ControllerApiDescription = ApiDescription<Arc<ControllerContext>>;
pub fn api() -> Result<ControllerApiDescription> {
let mut api = ControllerApiDescription::new();
api.register(machine::describe)?;
api.register(sysupdate::list_versions)?;
Ok(api)
}