feat(comms): IngestCachedTelemetry RPC + CachedTelemetryPacket proto (#23 M3)
This commit is contained in:
@@ -8,6 +8,7 @@ import "google/protobuf/wrappers.proto"; // Int32Value
|
||||
service SiteStreamService {
|
||||
rpc SubscribeInstance(InstanceStreamRequest) returns (stream SiteStreamEvent);
|
||||
rpc IngestAuditEvents(AuditEventBatch) returns (IngestAck);
|
||||
rpc IngestCachedTelemetry(CachedTelemetryBatch) returns (IngestAck);
|
||||
}
|
||||
|
||||
message InstanceStreamRequest {
|
||||
@@ -93,3 +94,28 @@ message AuditEventDto {
|
||||
|
||||
message AuditEventBatch { repeated AuditEventDto events = 1; }
|
||||
message IngestAck { repeated string accepted_event_ids = 1; }
|
||||
|
||||
// Audit Log (#23) M3 cached-call combined telemetry: a single packet carries
|
||||
// both the AuditEvent row to insert and the SiteCalls operational-state upsert
|
||||
// for one lifecycle event of a cached outbound call. Central writes both rows
|
||||
// in one MS SQL transaction so the audit and operational mirrors never drift.
|
||||
message SiteCallOperationalDto {
|
||||
string tracked_operation_id = 1; // GUID string ("D" format)
|
||||
string channel = 2; // "ApiOutbound" | "DbOutbound"
|
||||
string target = 3;
|
||||
string source_site = 4;
|
||||
string status = 5; // AuditStatus name
|
||||
int32 retry_count = 6;
|
||||
string last_error = 7; // empty when null
|
||||
google.protobuf.Int32Value http_status = 8;
|
||||
google.protobuf.Timestamp created_at_utc = 9;
|
||||
google.protobuf.Timestamp updated_at_utc = 10;
|
||||
google.protobuf.Timestamp terminal_at_utc = 11; // absent when not terminal
|
||||
}
|
||||
|
||||
message CachedTelemetryPacket {
|
||||
AuditEventDto audit_event = 1;
|
||||
SiteCallOperationalDto operational = 2;
|
||||
}
|
||||
|
||||
message CachedTelemetryBatch { repeated CachedTelemetryPacket packets = 1; }
|
||||
|
||||
Reference in New Issue
Block a user