mirror of
https://github.com/edera-dev/krata.git
synced 2025-09-29 16:11: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
99 lines
1.9 KiB
Protocol Buffer
99 lines
1.9 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package krata.v1.common;
|
|
|
|
option java_multiple_files = true;
|
|
option java_package = "dev.krata.proto.v1.common";
|
|
option java_outer_classname = "CommonProto";
|
|
|
|
import "google/protobuf/struct.proto";
|
|
|
|
message Guest {
|
|
string id = 1;
|
|
GuestSpec spec = 2;
|
|
GuestState state = 3;
|
|
}
|
|
|
|
message GuestSpec {
|
|
string name = 1;
|
|
GuestImageSpec image = 2;
|
|
uint32 vcpus = 3;
|
|
uint64 mem = 4;
|
|
GuestTaskSpec task = 5;
|
|
repeated GuestSpecAnnotation annotations = 6;
|
|
}
|
|
|
|
message GuestImageSpec {
|
|
oneof image {
|
|
GuestOciImageSpec oci = 1;
|
|
}
|
|
}
|
|
|
|
message GuestOciImageSpec {
|
|
string image = 1;
|
|
}
|
|
|
|
message GuestTaskSpec {
|
|
repeated GuestTaskSpecEnvVar environment = 1;
|
|
repeated string command = 2;
|
|
}
|
|
|
|
message GuestTaskSpecEnvVar {
|
|
string key = 1;
|
|
string value = 2;
|
|
}
|
|
|
|
message GuestSpecAnnotation {
|
|
string key = 1;
|
|
string value = 2;
|
|
}
|
|
|
|
message GuestState {
|
|
GuestStatus status = 1;
|
|
GuestNetworkState network = 2;
|
|
GuestExitInfo exit_info = 3;
|
|
GuestErrorInfo error_info = 4;
|
|
uint32 domid = 5;
|
|
}
|
|
|
|
enum GuestStatus {
|
|
GUEST_STATUS_UNKNOWN = 0;
|
|
GUEST_STATUS_STARTING = 1;
|
|
GUEST_STATUS_STARTED = 2;
|
|
GUEST_STATUS_EXITED = 3;
|
|
GUEST_STATUS_DESTROYING = 4;
|
|
GUEST_STATUS_DESTROYED = 5;
|
|
GUEST_STATUS_FAILED = 6;
|
|
}
|
|
|
|
message GuestNetworkState {
|
|
string guest_ipv4 = 1;
|
|
string guest_ipv6 = 2;
|
|
string guest_mac = 3;
|
|
string gateway_ipv4 = 4;
|
|
string gateway_ipv6 = 5;
|
|
string gateway_mac = 6;
|
|
}
|
|
|
|
message GuestExitInfo {
|
|
int32 code = 1;
|
|
}
|
|
|
|
message GuestErrorInfo {
|
|
string message = 1;
|
|
}
|
|
|
|
message GuestMetricNode {
|
|
string name = 1;
|
|
google.protobuf.Value value = 2;
|
|
GuestMetricFormat format = 3;
|
|
repeated GuestMetricNode children = 4;
|
|
}
|
|
|
|
enum GuestMetricFormat {
|
|
GUEST_METRIC_FORMAT_UNKNOWN = 0;
|
|
GUEST_METRIC_FORMAT_BYTES = 1;
|
|
GUEST_METRIC_FORMAT_INTEGER = 2;
|
|
GUEST_METRIC_FORMAT_DURATION_SECONDS = 3;
|
|
}
|