tart-guest-agent/proto/rpc/agent.proto

47 lines
784 B
Protocol Buffer

syntax = "proto3";
import "google/protobuf/empty.proto";
option go_package = "github.com/cirruslabs/tart-guest-agent/internal/rpc";
service Agent {
rpc Exec(stream ExecRequest) returns (stream ExecResponse);
}
message ExecRequest {
message Command {
string name = 1;
repeated string args = 2;
bool interactive = 3;
bool tty = 4;
TerminalSize terminal_size = 5;
}
oneof type {
Command command = 1;
IOChunk standard_input = 2;
TerminalSize terminal_resize = 3;
}
}
message ExecResponse {
message Exit {
int32 code = 1;
}
oneof type {
Exit exit = 1;
IOChunk standard_output = 2;
IOChunk standard_error = 3;
}
}
message TerminalSize {
uint32 rows = 1;
uint32 cols = 2;
}
message IOChunk {
bytes data = 1;
}