mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
35 lines
731 B
Protocol Buffer
35 lines
731 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
import "entity/response.proto";
|
|
|
|
package grpc;
|
|
option go_package = ".;grpc";
|
|
|
|
message NodeServiceRegisterRequest {
|
|
string node_key = 1;
|
|
string node_name = 2;
|
|
int32 max_runners = 3;
|
|
}
|
|
|
|
message NodeServiceSendHeartbeatRequest {
|
|
string node_key = 1;
|
|
}
|
|
|
|
message NodeServiceSubscribeRequest {
|
|
string node_key = 1;
|
|
}
|
|
|
|
enum NodeServiceSubscribeCode {
|
|
HEARTBEAT = 0;
|
|
}
|
|
|
|
message NodeServiceSubscribeResponse {
|
|
NodeServiceSubscribeCode code = 1;
|
|
}
|
|
|
|
service NodeService {
|
|
rpc Register(NodeServiceRegisterRequest) returns (Response){};
|
|
rpc SendHeartbeat(NodeServiceSendHeartbeatRequest) returns (Response){};
|
|
rpc Subscribe(NodeServiceSubscribeRequest) returns (stream NodeServiceSubscribeResponse){};
|
|
}
|