Skip to content

Commit f722bc5

Browse files
committed
Add filter support for ids and type
Signed-off-by: Mathias L. Baumann <[email protected]>
1 parent f5150da commit f722bc5

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

RELEASE_NOTES.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
## New Features
1212

13-
<!-- Here goes the main new features and examples or instructions on how to use them -->
13+
* New filters for the list rpc have been added: "ids" to search for one or more ids using partial matching and type to filter by the type of the dispatch, also partial matching.
1414

1515
## Bug Fixes
1616

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

+16
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,22 @@ message DispatchFilter {
309309

310310
// Optional filter by update time
311311
TimeIntervalFilter update_time_interval = 8;
312+
313+
// Optional filter by partial id matches
314+
// If this field is not set, dispatches of any id will be included.
315+
// Example:
316+
// - To retrieve dispatches with ids containing 123 (e.g.: [5123, 1234, 1235, 123]):
317+
// filter { ids: [123] }
318+
// - To retrieve dispatches with ids containing 1 and 5 (e.g.: [5, 1, 15, 51]):
319+
// filter { ids: [1, 5] }
320+
repeated uint64 ids = 9;
321+
322+
// Optional filter by partial type match
323+
// If this field is not set, dispatches of any type will be included.
324+
// Example:
325+
// - To retrieve dispatches with type containing "charge" (e.g.: ["charge", "discharge", "fast_charge"]):
326+
// filter { type: "charge" }
327+
optional string type = 10;
312328
}
313329

314330
// Parameter for controlling which components a dispatch applies to

0 commit comments

Comments
 (0)