VOL-4032: gRPC Streams for Events, Metrics

Change-Id: Iff813c7e701490833b8585a6c5516348000e541f
diff --git a/protos/dmi/hw_events_mgmt_service.proto b/protos/dmi/hw_events_mgmt_service.proto
index 641adbe..db04006 100644
--- a/protos/dmi/hw_events_mgmt_service.proto
+++ b/protos/dmi/hw_events_mgmt_service.proto
@@ -6,6 +6,7 @@
 import "dmi/commons.proto";

 import "dmi/hw.proto";

 import "google/protobuf/timestamp.proto";

+import "google/protobuf/empty.proto";

 

 // Management of Events and protos for encoding of Events

 

@@ -143,8 +144,8 @@
     string component_name = 3;

 }

 

-// The Events are conveyed to external systems by submitting them on a kafka bus.

-// The topic to which are Events are submitted would be configured as startup

+// The Events are conveyed to external systems either by submitting them on a message bus or using gRPC server streaming.

+// The message bus topic to which are Events are submitted would be configured as startup

 // configuration of the components

 

 message Event {

@@ -166,4 +167,7 @@
     // The default behavior of the device is to report all the supported events

     // This configuration is persisted across reboots of the device or the device manager

     rpc UpdateEventsConfiguration(EventsConfigurationRequest) returns(EventsConfigurationResponse);

+

+    // Initiate the server streaming of the events

+    rpc StreamEvents(google.protobuf.Empty) returns(stream Event);

 }

diff --git a/protos/dmi/hw_metrics_mgmt_service.proto b/protos/dmi/hw_metrics_mgmt_service.proto
index 72a8414..2f1a23d 100644
--- a/protos/dmi/hw_metrics_mgmt_service.proto
+++ b/protos/dmi/hw_metrics_mgmt_service.proto
@@ -5,6 +5,7 @@
 

 import "dmi/commons.proto";

 import "dmi/hw.proto";

+import "google/protobuf/empty.proto";

 

 // The model used to represent the event data on the SensorData of a component as described

 // in RFC8348 (https://tools.ietf.org/html/rfc8348)

@@ -108,7 +109,7 @@
     string component_name = 3;

 }

 

-// The Metrics are conveyed to external systems by submitting them on a kafka bus.

+// The Metrics are conveyed to external systems either by submitting them on a message bus or using gRPC server streaming.

 // The topic to which are Metrics are submitted would be configured as startup

 // configuration of the components

 message Metric {

@@ -153,4 +154,7 @@
 

     // Get the instantenous value of a metric

     rpc GetMetric(GetMetricRequest) returns(GetMetricResponse);

+

+    // Initiate the server streaming of the metrics

+    rpc StreamMetrics(google.protobuf.Empty) returns(stream Metric);

 }