Commit 8d537b7a by Ryan McKinley Committed by Torkel Ödegaard

Chore: remove StreamHandler and DataStreamState (#21234)

* remove StreamHandler

* remove DataStreamState
parent 6c2375e4
......@@ -373,62 +373,6 @@ export type LegacyResponseData = TimeSeries | TableData | any;
export type DataQueryResponseData = DataFrame | DataFrameDTO | LegacyResponseData;
export type DataStreamObserver = (event: DataStreamState) => void;
export interface DataStreamState {
/**
* when Done or Error no more events will be processed
*/
state: LoadingState;
/**
* The key is used to identify unique sets of data within
* a response, and join or replace them before sending them to the panel.
*
* For example consider a query that streams four DataFrames (A,B,C,D)
* and multiple events with keys K1, and K2
*
* query(...) returns: {
* state:Streaming
* data:[A]
* }
*
* Events:
* 1. {key:K1, data:[B1]} >> PanelData: [A,B1]
* 2. {key:K2, data:[C2,D2]} >> PanelData: [A,B1,C2,D2]
* 3. {key:K1, data:[B3]} >> PanelData: [A,B3,C2,D2]
* 4. {key:K2, data:[C4]} >> PanelData: [A,B3,C4]
*
* NOTE: that PanelData will not report a `Done` state until all
* unique keys have returned with either `Error` or `Done` state.
*/
key: string;
/**
* The stream request. The properties of this request will be examined
* to determine if the stream matches the original query. If not, it
* will be unsubscribed.
*/
request: DataQueryRequest;
/**
* The streaming events return entire DataFrames. The DataSource
* sending the events is responsible for truncating any growing lists
* most likely to the requested `maxDataPoints`
*/
data?: DataFrame[];
/**
* Error in stream (but may still be running)
*/
error?: DataQueryError;
/**
* Stop listening to this stream
*/
unsubscribe: () => void;
}
export interface DataQueryResponse {
/**
* The response data. When streaming, this may be empty
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment