orchard/rpc/orchard.proto

37 lines
951 B
Protocol Buffer

syntax = "proto3";
import "google/protobuf/empty.proto";
option go_package = "github.com/cirruslabs/orchard/rpc";
service Controller {
// message bus between the controller and a worker
rpc Watch(google.protobuf.Empty) returns (stream WatchInstruction);
// single purpose method when a port forward is requested and running
// session information is passed in the requests metadata
rpc PortForward(stream PortForwardData) returns (stream PortForwardData);
}
message WatchInstruction {
message PortForward {
// we can have multiple port forwards for the same vm/port pair
// let's distinguish them by a unique session
string session = 1;
// can be empty to request port-forwarding to the worker itself
string vm_uid = 2;
uint32 port = 3;
}
message SyncVMs {
}
oneof action {
PortForward port_forward_action = 1;
SyncVMs sync_vms_action = 2;
}
}
message PortForwardData {
bytes data = 1;
}