Skip to content

Commit eb4cd4a

Browse files
authored
Remove deprecated & unused ElasticsearchServiceStart.legacy (#127050)
1 parent d1f0d23 commit eb4cd4a

8 files changed

+0
-49
lines changed

docs/development/core/server/kibana-plugin-core-server.elasticsearchservicesetup.legacy.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
> Warning: This API is now obsolete.
88
>
9-
> Use [ElasticsearchServiceStart.legacy](./kibana-plugin-core-server.elasticsearchservicestart.legacy.md) instead.
109
>
1110
1211
<b>Signature:</b>

docs/development/core/server/kibana-plugin-core-server.elasticsearchservicestart.legacy.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

docs/development/core/server/kibana-plugin-core-server.elasticsearchservicestart.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,4 @@ export interface ElasticsearchServiceStart
1717
| --- | --- | --- |
1818
| [client](./kibana-plugin-core-server.elasticsearchservicestart.client.md) | IClusterClient | A pre-configured [Elasticsearch client](./kibana-plugin-core-server.iclusterclient.md) |
1919
| [createClient](./kibana-plugin-core-server.elasticsearchservicestart.createclient.md) | (type: string, clientConfig?: Partial&lt;ElasticsearchClientConfig&gt;) =&gt; ICustomClusterClient | Create application specific Elasticsearch cluster API client with customized config. See [IClusterClient](./kibana-plugin-core-server.iclusterclient.md)<!-- -->. |
20-
| [legacy](./kibana-plugin-core-server.elasticsearchservicestart.legacy.md) | { readonly config$: Observable&lt;ElasticsearchConfig&gt;; } | |
2120

src/core/server/elasticsearch/elasticsearch_service.mock.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ export type MockedElasticSearchServiceSetup = jest.Mocked<
3737
};
3838

3939
export interface MockedElasticSearchServiceStart {
40-
legacy: {
41-
config$: BehaviorSubject<ElasticsearchConfig>;
42-
};
4340
client: ClusterClientMock;
4441
createClient: jest.MockedFunction<
4542
(name: string, config?: Partial<ElasticsearchClientConfig>) => CustomClusterClientMock
@@ -71,9 +68,6 @@ const createStartContractMock = () => {
7168
const startContract: MockedElasticSearchServiceStart = {
7269
client: elasticsearchClientMock.createClusterClient(),
7370
createClient: jest.fn(),
74-
legacy: {
75-
config$: new BehaviorSubject({} as ElasticsearchConfig),
76-
},
7771
};
7872

7973
startContract.createClient.mockImplementation(() =>

src/core/server/elasticsearch/elasticsearch_service.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,6 @@ export class ElasticsearchService
141141
return {
142142
client: this.client!,
143143
createClient: (type, clientConfig) => this.createClusterClient(type, config, clientConfig),
144-
legacy: {
145-
config$: this.config$,
146-
},
147144
};
148145
}
149146

src/core/server/elasticsearch/types.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ export interface ElasticsearchServiceSetup {
8181

8282
/**
8383
* @deprecated
84-
* Use {@link ElasticsearchServiceStart.legacy} instead.
8584
*/
8685
legacy: {
8786
/**
@@ -136,20 +135,6 @@ export interface ElasticsearchServiceStart {
136135
type: string,
137136
clientConfig?: Partial<ElasticsearchClientConfig>
138137
) => ICustomClusterClient;
139-
140-
/**
141-
* @deprecated
142-
* Provided for the backward compatibility.
143-
* Switch to the new elasticsearch client as soon as https://github.com/elastic/kibana/issues/35508 done.
144-
* */
145-
legacy: {
146-
/**
147-
* Provide direct access to the current elasticsearch configuration.
148-
*
149-
* @deprecated this will be removed in a later version.
150-
*/
151-
readonly config$: Observable<ElasticsearchConfig>;
152-
};
153138
}
154139

155140
/**

src/core/server/plugins/plugin_context.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ export function createPluginStartContext<TPlugin, TPluginDependencies>(
242242
elasticsearch: {
243243
client: deps.elasticsearch.client,
244244
createClient: deps.elasticsearch.createClient,
245-
legacy: deps.elasticsearch.legacy,
246245
},
247246
executionContext: deps.executionContext,
248247
http: {

src/core/server/server.api.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -959,10 +959,6 @@ export interface ElasticsearchServiceSetup {
959959
export interface ElasticsearchServiceStart {
960960
readonly client: IClusterClient;
961961
readonly createClient: (type: string, clientConfig?: Partial<ElasticsearchClientConfig>) => ICustomClusterClient;
962-
// @deprecated (undocumented)
963-
legacy: {
964-
readonly config$: Observable<ElasticsearchConfig>;
965-
};
966962
}
967963

968964
// @public (undocumented)

0 commit comments

Comments
 (0)