Debian Codegraph @

proto/svc/ingest/v1/service.proto

raw
1 syntax = "proto3";
2
3 package svc.ingest.v1;
4
5 import "google/protobuf/duration.proto";
6 import "types/v1/logevent.proto";
7
8 option go_package = "svc/ingest/v1;ingestv1";
9
10 service IngestService {
11 rpc GetHeartbeat(GetHeartbeatRequest) returns (GetHeartbeatResponse);
12 rpc Ingest(IngestRequest) returns (IngestResponse);
13 rpc IngestStream(stream IngestStreamRequest) returns (IngestStreamResponse);
14 rpc IngestBidiStream(stream IngestBidiStreamRequest) returns (stream IngestBidiStreamResponse);
15 }
16
17 message GetHeartbeatRequest {
18 // may change the heartbeat if specified
19 optional uint64 machine_id = 1;
20 optional uint64 session_id = 2;
21 }
22 message GetHeartbeatResponse {
23 google.protobuf.Duration heartbeat_in = 1;
24 }
25
26 message IngestRequest {
27 uint64 machine_id = 1;
28 // session ID, unique per machine.
29 // if not specified, one will be returned
30 uint64 session_id = 2;
31 repeated types.v1.LogEvent events = 3;
32 }
33
34 message IngestResponse {
35 uint64 session_id = 1;
36 google.protobuf.Duration heartbeat_in = 2;
37 }
38
39 message IngestStreamRequest {
40 // only evaluated on the first message
41 uint64 machine_id = 1;
42 // session ID, unique per machine
43 uint64 session_id = 2;
44 repeated types.v1.LogEvent events = 3;
45 }
46
47 message IngestStreamResponse {
48 uint64 session_id = 1;
49 google.protobuf.Duration heartbeat_in = 2;
50 }
51
52 message IngestBidiStreamRequest {
53 repeated types.v1.LogEvent events = 1;
54 // only evaluated on the first message
55 uint64 machine_id = 2;
56 // Optional session ID to mark as resuming.
57 uint64 resume_session_id = 3;
58 }
59
60 message IngestBidiStreamResponse {
61 uint64 session_id = 1;
62 google.protobuf.Duration heartbeat_in = 2;
63 }