Skip to content

Commit 6e553a8

Browse files
authored
Rename selector to target (#204)
Also renames the other fields to no longer use the term "selector" fixes #202 This is a non-breaking update, as this only contains renames. All field IDs stay the same.
2 parents 52ea6eb + 7616233 commit 6e553a8

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

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

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ message StreamMicrogridDispatchesResponse {
115115
Event event = 2;
116116
}
117117

118-
// Represents a dispatches data, including its type, start time, duration, component selector,
118+
// Represents a dispatches data, including its type, start time, duration,
119+
// and target components.
119120
//
120121
// Timezone Note: Timestamps are in UTC. It is the responsibility of each microgrid to translate UTC
121122
// to its local timezone.
@@ -139,8 +140,8 @@ message DispatchData {
139140
// immediately starts and ends, e.g. switching a component on and off.
140141
optional uint32 duration = 3;
141142

142-
// Dispatch microgrid component selector
143-
ComponentSelector selector = 4;
143+
// The components this dispatch should apply to.
144+
TargetComponents target = 4;
144145

145146
// The "active" status
146147
// An active dispatch is eligible for processing, either immediately or at a scheduled
@@ -252,7 +253,7 @@ message DispatchFilter {
252253
}
253254

254255
// Optional filter by component ID or category.
255-
repeated ComponentSelector selectors = 1;
256+
repeated TargetComponents targets = 1;
256257

257258
// Optional filter by active status.
258259
// If this field is not set, dispatches of any active status will be included.
@@ -314,10 +315,10 @@ message DispatchFilter {
314315
// either a set of component IDs, or a set of component categories.
315316
// Examples:
316317
// - To dispatch to a set of component IDs:
317-
// selector { component_ids { ids: [1, 2, 3] } }
318+
// components { component_ids { ids: [1, 2, 3] } }
318319
// - To dispatch to a set of component categories:
319-
// selector { component_categories { categories: [COMPONENT_CATEGORY_BATTERY, COMPONENT_CRYPTO_MINER] } }
320-
message ComponentSelector {
320+
// components { component_categories { categories: [COMPONENT_CATEGORY_BATTERY, COMPONENT_CRYPTO_MINER] } }
321+
message TargetComponents {
321322
// Wrapper for controlling dispatches with a set of component IDs
322323
// Required as we can't use `repeated` directly in a `oneof`
323324
message IdSet {
@@ -332,7 +333,7 @@ message ComponentSelector {
332333
repeated frequenz.api.common.v1.microgrid.components.ComponentCategory categories = 1;
333334
}
334335

335-
oneof selector {
336+
oneof components {
336337
// Set of component IDs
337338
IdSet component_ids = 1;
338339

@@ -605,8 +606,8 @@ message UpdateMicrogridDispatchRequest {
605606
// Duration in seconds
606607
optional uint32 duration = 2;
607608

608-
// The component selector
609-
ComponentSelector selector = 3;
609+
// The target components
610+
TargetComponents target = 3;
610611

611612
// The "active" status
612613
optional bool is_active = 4;

0 commit comments

Comments
 (0)