gocron/modules/rpc/proto/task.proto

16 lines
277 B
Protocol Buffer

syntax = "proto3";
package rpc;
service Task {
rpc Run(TaskRequest) returns (TaskResponse) {}
}
message TaskRequest {
string command = 2; // 命令
int32 timeout = 3; // 任务执行超时时间
}
message TaskResponse {
string output = 1; // 命令输出
}