Goby3  3.1.5a
2024.05.23
coroner.proto
Go to the documentation of this file.
1 syntax = "proto2";
2 
3 import "dccl/option_extensions.proto";
4 
5 package goby.middleware.protobuf;
6 
7 message HealthRequest {}
8 
9 enum HealthState
10 {
11  HEALTH__OK = 1;
12  HEALTH__DEGRADED = 2;
13  HEALTH__FAILED = 3;
14 }
15 
16 enum Error
17 {
18  ERROR__PROCESS_DIED = 1;
19 
20  ERROR__THREAD_NOT_RESPONDING = 100;
21 }
22 
23 message ThreadHealth
24 {
25  required string name = 1;
26  oneof t_id
27  {
28  // Linux thread ID.
29  int32 thread_id = 2;
30  // Apple thread ID.
31  uint64 thread_id_apple = 4;
32  }
33  optional int32 uid = 3;
34  required HealthState state = 10;
35  repeated ThreadHealth child = 11;
36  optional Error error = 20;
37  optional string error_message = 21;
38 
39  extensions 1000 to max;
40  // 1000 - jaiabot
41 }
42 
43 message ProcessHealth
44 {
45  required string name = 1;
46  optional uint32 pid = 2;
47 
48  required ThreadHealth main = 10;
49 
50  extensions 1000 to max;
51  // 1000 - jaiabot
52 }
53 
54 message VehicleHealth
55 {
56  option (dccl.msg).unit_system = "si";
57 
58  required uint64 time = 1
59  [(dccl.field).units = { prefix: "micro" base_dimensions: "T" }];
60  required string platform = 2;
61 
62  required HealthState state = 10;
63  repeated ProcessHealth process = 11;
64 
65  extensions 1000 to max;
66  // 1000 - jaiabot
67 }