Skip to content

Commit 550525e

Browse files
committed
Add gRPC service definition for ACR<->ADP IPC
Restore the AcrIpc gRPC service with four RPCs: - Handshake (unary) - SendCheckData (unary with ACK) - SendCheckResult (unary) - StreamConfig (server streaming for config push). Re-enable server and client codegen for the checks proto compilation.
1 parent 7f57e39 commit 550525e

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

lib/protos/datadog/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ fn main() {
146146
.expect("Failed to build gRPC service definitions for Datadog Agent.");
147147

148148
tonic_prost_build::configure()
149-
.build_server(false)
150-
.build_client(false)
149+
.build_server(true)
150+
.build_client(true)
151151
.include_file("checks.mod.rs")
152152
.compile_protos(
153153
&[

lib/protos/datadog/proto/checks/v1/acr_ipc.proto

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,22 @@ message CheckResultMsg {
7171
string check_id = 3;
7272
string error = 4;
7373
}
74+
75+
// Trivial request/response types for RPCs that don't need a body.
76+
message StreamConfigRequest {}
77+
message SendCheckResultResponse {}
78+
79+
// gRPC service for ACR <-> ADP IPC.
80+
service AcrIpc {
81+
// Handshake — first call after connecting.
82+
rpc Handshake(Hello) returns (HelloResp);
83+
84+
// Check data submission with acknowledgement.
85+
rpc SendCheckData(CheckDataMsg) returns (CheckDataAck);
86+
87+
// Check result reporting.
88+
rpc SendCheckResult(CheckResultMsg) returns (SendCheckResultResponse);
89+
90+
// Server pushes config updates to the client as a stream.
91+
rpc StreamConfig(StreamConfigRequest) returns (stream ConfigData);
92+
}

0 commit comments

Comments
 (0)