mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 18:27:59 -04:00
This creates a response_stream plugin in the Kibana /examples section. The plugin demonstrates API endpoints that can stream data chunks with a single request with gzip/compression support. gzip-streams get decompressed natively by browsers. The plugin demonstrates two use cases to get started: Streaming a raw string as well as a more complex example that streams Redux-like actions to the client which update React state via useReducer().
16 lines
685 B
TypeScript
16 lines
685 B
TypeScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
* Side Public License, v 1.
|
|
*/
|
|
|
|
import { FtrProviderContext } from '../../functional/ftr_provider_context';
|
|
|
|
// eslint-disable-next-line import/no-default-export
|
|
export default function ({ getService, getPageObjects, loadTestFile }: FtrProviderContext) {
|
|
describe('response stream', function () {
|
|
loadTestFile(require.resolve('./reducer_stream'));
|
|
});
|
|
}
|