Skip to content

Commit b612ac3

Browse files
Update time filter docs, clarify presence/absence of fields
Signed-off-by: Stefan Brus <[email protected]>
1 parent e05df2c commit b612ac3

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

proto/frequenz/api/reporting/v1alpha10/reporting.proto

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,25 @@ enum FilterOption {
7474
FILTER_OPTION_INCLUDE = 2;
7575
}
7676

77-
// Time-based filter for querying aggregated microgrid components data.
77+
// Time-filter defining the historical window and real-time behaviour of the stream.
7878
//
79-
// !!! note
80-
// Specifies the start and end time for the query. Both fields are optional, but
81-
// their absence or presence has specific implications for the query results.
82-
// Data will be returned as a set of rows, which each row containing a timestamp.
83-
// This timestamp will be >= start and < end.
79+
// Semantics:
80+
// - If `end_time` is provided, it MUST be ≤ the current server time. The
81+
// server streams all samples t where start_time ≤ t < end_time and
82+
// then closes the stream.
83+
//
84+
// - If `end_time` is omitted, the server streams all historical samples
85+
// t ≥ start_time (if provided) and then continues streaming new samples
86+
// in real time. The stream remains open indefinitely.
87+
//
88+
// - If `start_time` is omitted:
89+
// – and `end_time` is omitted: the stream produces no historical data
90+
// and begins streaming real-time samples only.
91+
// – and `end_time` is provided: the historical window is empty and
92+
// the stream closes immediately.
93+
//
94+
// Validation rules:
95+
// - end_time > now() → INVALID_ARGUMENT
8496
message TimeFilter {
8597
// Optional UTC start time for the query.
8698
//

0 commit comments

Comments
 (0)