yats-connectors.git

ref: 8c8cbb6db9433615f303e7f901ed3b14b82fe159

./yats-grpc.proto


 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
/**
 * Yats - yats
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author Paolo Lulli <kevwe.com>
 * @copyright Paolo Lulli 2024
 */

syntax = "proto3";
package yats;

option java_package = "com.kevwe.yats.protobuf";
option java_multiple_files = true;
option go_package = "yats/proto";

message Metric {
  string id_client = 1;
  int64 mtime = 2;
  string name = 3;
  string value = 4;
}

message Event {
  string id_client = 1;
  int64 etime = 2;
  string name = 3;
}

message CreateMetricRequest {
  Metric metric = 1;
}

message CreateMetricResponse {
  Metric metric = 1;
}

message CreateEventRequest {
  Event event = 1;
}

message CreateEventResponse {
  Event event = 1;
}

service YatsGrpcService {
  rpc CreateMetric(CreateMetricRequest) returns (CreateMetricResponse);
  rpc CreateEvent(CreateEventRequest) returns (CreateEventResponse);
}