syntax = "proto3";
package emerwen.workercontrol;
import "shared/target.proto";
service WorkerControlService {
rpc WorkerStream(stream WorkerMessage) returns (stream ServerCommand) {}
}
message WorkerMessage {
string worker_id = 1;
oneof msg {
RegistrationMessage registration = 2;
TargetStateMessage target_state = 3;
}
}
message RegistrationMessage {}
message TargetStateMessage {
string target_id = 1;
shared.TargetState state = 2;
}
message ServerCommand {
oneof cmd {
TargetsCommand targets = 1;
}
}
message TargetsCommand {
repeated shared.Target targets = 1;
}