File tree Expand file tree Collapse file tree 1 file changed +18
-6
lines changed
proto/frequenz/api/reporting/v1alpha10 Expand file tree Collapse file tree 1 file changed +18
-6
lines changed Original file line number Diff line number Diff 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
8496message TimeFilter {
8597 // Optional UTC start time for the query.
8698 //
You can’t perform that action at this time.
0 commit comments