krata: move api proto to /proto and version api

This commit is contained in:
Alex Zenla
2024-03-24 05:52:25 +00:00
parent cb6839b0f6
commit 655b8029cb
26 changed files with 41 additions and 36 deletions

View File

@ -2,7 +2,7 @@ use std::io::Result;
fn main() -> Result<()> {
prost_build::Config::new()
.extern_path(".krata.common", "::krata::common")
.compile_protos(&["proto/kratad/db.proto"], &["proto/", "../krata/proto"])?;
.extern_path(".krata.v1.common", "::krata::v1::common")
.compile_protos(&["proto/kratad/db.proto"], &["proto/", "../../proto"])?;
Ok(())
}

View File

@ -2,9 +2,9 @@ syntax = "proto3";
package kratad.db;
import "krata/common.proto";
import "krata/v1/common.proto";
message GuestEntry {
string id = 1;
krata.common.Guest guest = 2;
krata.v1.common.Guest guest = 2;
}

View File

@ -2,7 +2,7 @@ use std::{io, pin::Pin, str::FromStr};
use async_stream::try_stream;
use futures::Stream;
use krata::{
use krata::v1::{
common::{Guest, GuestState, GuestStatus},
control::{
control_service_server::ControlService, ConsoleDataReply, ConsoleDataRequest,

View File

@ -5,7 +5,7 @@ use std::{
};
use anyhow::Result;
use krata::common::{GuestExitInfo, GuestState, GuestStatus};
use krata::v1::common::{GuestExitInfo, GuestState, GuestStatus};
use log::error;
use tokio::{
select,
@ -22,7 +22,7 @@ use kratart::Runtime;
use crate::db::GuestStore;
pub type DaemonEvent = krata::control::watch_events_reply::Event;
pub type DaemonEvent = krata::v1::control::watch_events_reply::Event;
const EVENT_CHANNEL_QUEUE_LEN: usize = 1000;
const EXIT_CODE_CHANNEL_QUEUE_LEN: usize = 1000;

View File

@ -4,7 +4,7 @@ use anyhow::Result;
use control::RuntimeControlService;
use db::GuestStore;
use event::{DaemonEventContext, DaemonEventGenerator};
use krata::{control::control_service_server::ControlServiceServer, dial::ControlDialAddress};
use krata::{dial::ControlDialAddress, v1::control::control_service_server::ControlServiceServer};
use kratart::Runtime;
use log::info;
use reconcile::guest::GuestReconciler;

View File

@ -1,7 +1,7 @@
use std::{collections::HashMap, time::Duration};
use anyhow::{anyhow, Result};
use krata::{
use krata::v1::{
common::{
guest_image_spec::Image, Guest, GuestErrorInfo, GuestExitInfo, GuestNetworkState,
GuestState, GuestStatus,