Skip to content

Commit 78dd77a

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

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

RELEASE_NOTES.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
* Added more detailed documentation on how to use pagination.
1414
* Added `start_immediately` to the create RPC.
15+
* 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.
1516

1617
## Bug Fixes
1718

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)