mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
Remove deprecated & unused ElasticsearchServiceStart.legacy
(#127050)
This commit is contained in:
parent
d1f0d23ad7
commit
eb4cd4a2ff
8 changed files with 0 additions and 49 deletions
|
@ -6,7 +6,6 @@
|
|||
|
||||
> Warning: This API is now obsolete.
|
||||
>
|
||||
> Use [ElasticsearchServiceStart.legacy](./kibana-plugin-core-server.elasticsearchservicestart.legacy.md) instead.
|
||||
>
|
||||
|
||||
<b>Signature:</b>
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [ElasticsearchServiceStart](./kibana-plugin-core-server.elasticsearchservicestart.md) > [legacy](./kibana-plugin-core-server.elasticsearchservicestart.legacy.md)
|
||||
|
||||
## ElasticsearchServiceStart.legacy property
|
||||
|
||||
> Warning: This API is now obsolete.
|
||||
>
|
||||
> Provided for the backward compatibility. Switch to the new elasticsearch client as soon as https://github.com/elastic/kibana/issues/35508 done.
|
||||
>
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
legacy: {
|
||||
readonly config$: Observable<ElasticsearchConfig>;
|
||||
};
|
||||
```
|
|
@ -17,5 +17,4 @@ export interface ElasticsearchServiceStart
|
|||
| --- | --- | --- |
|
||||
| [client](./kibana-plugin-core-server.elasticsearchservicestart.client.md) | IClusterClient | A pre-configured [Elasticsearch client](./kibana-plugin-core-server.iclusterclient.md) |
|
||||
| [createClient](./kibana-plugin-core-server.elasticsearchservicestart.createclient.md) | (type: string, clientConfig?: Partial<ElasticsearchClientConfig>) => ICustomClusterClient | Create application specific Elasticsearch cluster API client with customized config. See [IClusterClient](./kibana-plugin-core-server.iclusterclient.md)<!-- -->. |
|
||||
| [legacy](./kibana-plugin-core-server.elasticsearchservicestart.legacy.md) | { readonly config$: Observable<ElasticsearchConfig>; } | |
|
||||
|
||||
|
|
|
@ -37,9 +37,6 @@ export type MockedElasticSearchServiceSetup = jest.Mocked<
|
|||
};
|
||||
|
||||
export interface MockedElasticSearchServiceStart {
|
||||
legacy: {
|
||||
config$: BehaviorSubject<ElasticsearchConfig>;
|
||||
};
|
||||
client: ClusterClientMock;
|
||||
createClient: jest.MockedFunction<
|
||||
(name: string, config?: Partial<ElasticsearchClientConfig>) => CustomClusterClientMock
|
||||
|
@ -71,9 +68,6 @@ const createStartContractMock = () => {
|
|||
const startContract: MockedElasticSearchServiceStart = {
|
||||
client: elasticsearchClientMock.createClusterClient(),
|
||||
createClient: jest.fn(),
|
||||
legacy: {
|
||||
config$: new BehaviorSubject({} as ElasticsearchConfig),
|
||||
},
|
||||
};
|
||||
|
||||
startContract.createClient.mockImplementation(() =>
|
||||
|
|
|
@ -141,9 +141,6 @@ export class ElasticsearchService
|
|||
return {
|
||||
client: this.client!,
|
||||
createClient: (type, clientConfig) => this.createClusterClient(type, config, clientConfig),
|
||||
legacy: {
|
||||
config$: this.config$,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -81,7 +81,6 @@ export interface ElasticsearchServiceSetup {
|
|||
|
||||
/**
|
||||
* @deprecated
|
||||
* Use {@link ElasticsearchServiceStart.legacy} instead.
|
||||
*/
|
||||
legacy: {
|
||||
/**
|
||||
|
@ -136,20 +135,6 @@ export interface ElasticsearchServiceStart {
|
|||
type: string,
|
||||
clientConfig?: Partial<ElasticsearchClientConfig>
|
||||
) => ICustomClusterClient;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* Provided for the backward compatibility.
|
||||
* Switch to the new elasticsearch client as soon as https://github.com/elastic/kibana/issues/35508 done.
|
||||
* */
|
||||
legacy: {
|
||||
/**
|
||||
* Provide direct access to the current elasticsearch configuration.
|
||||
*
|
||||
* @deprecated this will be removed in a later version.
|
||||
*/
|
||||
readonly config$: Observable<ElasticsearchConfig>;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -242,7 +242,6 @@ export function createPluginStartContext<TPlugin, TPluginDependencies>(
|
|||
elasticsearch: {
|
||||
client: deps.elasticsearch.client,
|
||||
createClient: deps.elasticsearch.createClient,
|
||||
legacy: deps.elasticsearch.legacy,
|
||||
},
|
||||
executionContext: deps.executionContext,
|
||||
http: {
|
||||
|
|
|
@ -959,10 +959,6 @@ export interface ElasticsearchServiceSetup {
|
|||
export interface ElasticsearchServiceStart {
|
||||
readonly client: IClusterClient;
|
||||
readonly createClient: (type: string, clientConfig?: Partial<ElasticsearchClientConfig>) => ICustomClusterClient;
|
||||
// @deprecated (undocumented)
|
||||
legacy: {
|
||||
readonly config$: Observable<ElasticsearchConfig>;
|
||||
};
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue