mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-10 00:21:31 +00:00
feat: rework to support multiple platforms
This commit is contained in:
@ -5,7 +5,7 @@ use ipnetwork::IpNetwork;
|
||||
use loopdev::LoopControl;
|
||||
use tokio::sync::Semaphore;
|
||||
use uuid::Uuid;
|
||||
use xenclient::XenClient;
|
||||
use xenclient::{x86pv::X86PvPlatform, XenClient};
|
||||
use xenstore::{XsdClient, XsdInterface};
|
||||
|
||||
use self::{
|
||||
@ -46,12 +46,12 @@ pub struct GuestInfo {
|
||||
#[derive(Clone)]
|
||||
pub struct RuntimeContext {
|
||||
pub autoloop: AutoLoop,
|
||||
pub xen: XenClient,
|
||||
pub xen: XenClient<X86PvPlatform>,
|
||||
}
|
||||
|
||||
impl RuntimeContext {
|
||||
pub async fn new() -> Result<Self> {
|
||||
let xen = XenClient::open(0).await?;
|
||||
let xen = XenClient::new(0, X86PvPlatform::new()).await?;
|
||||
Ok(RuntimeContext {
|
||||
autoloop: AutoLoop::new(LoopControl::open()?),
|
||||
xen,
|
||||
|
Reference in New Issue
Block a user