mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-03 05:10:55 +00:00
99 lines
1.9 KiB
Protocol Buffer
99 lines
1.9 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package krata.idm.internal;
|
|
|
|
option java_multiple_files = true;
|
|
option java_package = "dev.krata.proto.idm.internal";
|
|
option java_outer_classname = "IdmInternalProto";
|
|
|
|
import "google/protobuf/struct.proto";
|
|
|
|
message ExitEvent {
|
|
int32 code = 1;
|
|
}
|
|
|
|
message PingRequest {}
|
|
|
|
message PingResponse {}
|
|
|
|
message MetricsRequest {}
|
|
|
|
message MetricsResponse {
|
|
MetricNode root = 1;
|
|
}
|
|
|
|
message MetricNode {
|
|
string name = 1;
|
|
google.protobuf.Value value = 2;
|
|
MetricFormat format = 3;
|
|
repeated MetricNode children = 4;
|
|
}
|
|
|
|
enum MetricFormat {
|
|
METRIC_FORMAT_UNKNOWN = 0;
|
|
METRIC_FORMAT_BYTES = 1;
|
|
METRIC_FORMAT_INTEGER = 2;
|
|
METRIC_FORMAT_DURATION_SECONDS = 3;
|
|
}
|
|
|
|
message ExecEnvVar {
|
|
string key = 1;
|
|
string value = 2;
|
|
}
|
|
|
|
message ExecStreamRequestStart {
|
|
repeated ExecEnvVar environment = 1;
|
|
repeated string command = 2;
|
|
string working_directory = 3;
|
|
bool tty = 4;
|
|
ExecStreamRequestTerminalSize terminal_size = 5;
|
|
}
|
|
|
|
message ExecStreamRequestStdin {
|
|
bytes data = 1;
|
|
bool closed = 2;
|
|
}
|
|
|
|
message ExecStreamRequestTerminalSize {
|
|
uint32 rows = 1;
|
|
uint32 columns = 2;
|
|
}
|
|
|
|
message ExecStreamRequestUpdate {
|
|
oneof update {
|
|
ExecStreamRequestStart start = 1;
|
|
ExecStreamRequestStdin stdin = 2;
|
|
ExecStreamRequestTerminalSize terminal_resize = 3;
|
|
}
|
|
}
|
|
|
|
message ExecStreamResponseUpdate {
|
|
bool exited = 1;
|
|
string error = 2;
|
|
int32 exit_code = 3;
|
|
bytes stdout = 4;
|
|
bytes stderr = 5;
|
|
}
|
|
|
|
message Event {
|
|
oneof event {
|
|
ExitEvent exit = 1;
|
|
}
|
|
}
|
|
|
|
message Request {
|
|
oneof request {
|
|
PingRequest ping = 1;
|
|
MetricsRequest metrics = 2;
|
|
ExecStreamRequestUpdate exec_stream = 3;
|
|
}
|
|
}
|
|
|
|
message Response {
|
|
oneof response {
|
|
PingResponse ping = 1;
|
|
MetricsResponse metrics = 2;
|
|
ExecStreamResponseUpdate exec_stream = 3;
|
|
}
|
|
}
|