-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnode.proto
More file actions
44 lines (34 loc) · 832 Bytes
/
node.proto
File metadata and controls
44 lines (34 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
syntax = "proto3";
package node;
service NodeService {
// Check node health (heartbeat)
rpc Heartbeat (HeartbeatRequest) returns (HeartbeatResponse);
// Assign a task to a node
rpc AssignTask (TaskRequest) returns (TaskResponse);
// Get node status
rpc GetNodeStatus (NodeStatusRequest) returns (NodeStatusResponse);
}
message HeartbeatRequest {
string node_id = 1;
}
message HeartbeatResponse {
bool healthy = 1;
}
message TaskRequest {
string task_id = 1;
uint64 required_ram = 2;
uint64 required_cpu = 3;
uint64 required_bandwidth = 4;
bytes data = 5;
}
message TaskResponse {
bool success = 1;
string message = 2;
}
message NodeStatusRequest {}
message NodeStatusResponse {
string node_id = 1;
uint64 available_ram = 2;
uint64 available_cpu = 3;
uint64 available_bandwidth = 4;
}