DEVELOPMENT ENVIRONMENT

~liljamo/emerwen-proto

ref: 8aa1fdcc154e6f7b62c29356fc8d34dffa4f1fe4 emerwen-proto/proto/coordinatorcontrol.proto -rw-r--r-- 1.5 KiB
8aa1fdccJonni Liljamo feat!: iteration number whatever, revamp whooo! 6 hours ago
                                                                                
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
45
46
47
48
49
50
51
52
53
54
55
56
57
syntax = "proto3";
package emerwen.coordinatorcontrol;

option go_package = "git.src.quest/~liljamo/emerwen-proto/go/proto";

import "google/protobuf/empty.proto";
import "shared/target.proto";
import "shared/worker.proto";

service CoordinatorControlService {
    rpc GetWorkers (google.protobuf.Empty) returns (WorkersResponse);
    rpc NewWorker (NewWorkerRequest) returns (google.protobuf.Empty);
    rpc PatchWorker (PatchWorkerRequest) returns (google.protobuf.Empty);
    rpc DeleteTarget (DeleteTargetRequest) returns (google.protobuf.Empty);
    rpc NewTarget (NewTargetRequest) returns (google.protobuf.Empty);
    rpc PatchTarget (PatchTargetRequest) returns (google.protobuf.Empty);
    rpc DeleteWorker (DeleteWorkerRequest) returns (google.protobuf.Empty);
}

message WorkersResponse {
    repeated shared.Worker workers = 1;
}

message NewWorkerRequest {
    string name = 1;
}

message PatchWorkerRequest {
    string worker_id = 1;
    optional string name = 2;
}

message DeleteWorkerRequest {
    string worker_id = 1;
}

message NewTargetRequest {
    string worker_id = 1;
    string name = 2;
    string addr = 3;
    int32 interval = 4;
    shared.Method method = 5;
    repeated int32 ok_codes = 6;
}

message PatchTargetRequest {
    string target_id = 1;
    optional string name = 2;
    optional string addr = 3;
    optional int32 interval = 4;
    optional shared.Method method = 5;
    repeated int32 ok_codes = 6;
}

message DeleteTargetRequest {
    string target_id = 1;
}