Skip to content

Commit 22d30fa

Browse files
authored
Use Event message from common api (#270)
fixes #231
2 parents 9302c3f + ba3f84f commit 22d30fa

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Summary
44

5+
- Use `frequenz.api.common.v1alpha8.streaming.Event` message instead of the local `Event` message.
56
- Updated all `frequenz.api.common` imports from `v1` to `v1alpha8`.
67
- Removed the `TimeIntervalFilter` message, replacing its usage with the new `frequenz.api.common.v1alpha8.types.Interval` type.
78
- In the `DispatchFilter` message, the `start_time_interval`, `end_time_interval`, and `update_time_interval` fields were updated to use the new `Interval` type.

proto/frequenz/api/dispatch/v1/dispatch.proto

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import "google/protobuf/timestamp.proto";
2020
import "frequenz/api/common/v1alpha8/microgrid/electrical_components/electrical_components.proto";
2121
import "frequenz/api/common/v1alpha8/pagination/pagination_info.proto";
2222
import "frequenz/api/common/v1alpha8/pagination/pagination_params.proto";
23+
import "frequenz/api/common/v1alpha8/streaming/event.proto";
2324
import "frequenz/api/common/v1alpha8/types/interval.proto";
2425

2526
// Service providing operations related to dispatching microgrid components.
@@ -95,25 +96,11 @@ message StreamMicrogridDispatchesRequest {
9596
// Response to a subscription request for a stream of microgrid dispatches.
9697
// Real-time information on dispatches affecting a certain microgrid are pushed through this response.
9798
message StreamMicrogridDispatchesResponse {
98-
enum Event {
99-
// Default, unspecified event
100-
EVENT_UNSPECIFIED = 0;
101-
102-
// A new dispatch has been created
103-
EVENT_CREATED = 1;
104-
105-
// An existing dispatch has been updated
106-
EVENT_UPDATED = 2;
107-
108-
// An existing dispatch has been deleted
109-
EVENT_DELETED = 3;
110-
}
111-
11299
// Dispatch record returned.
113100
Dispatch dispatch = 1;
114101

115102
// Which event this response was triggered by
116-
Event event = 2;
103+
frequenz.api.common.v1alpha8.streaming.Event event = 2;
117104
}
118105

119106
// Represents a dispatches data, including its type, start time, duration,

0 commit comments

Comments
 (0)