Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mshustov committed May 29, 2020
1 parent 077d0d6 commit fcccf96
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

## ElasticsearchServiceSetup.legacy property

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

```typescript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

## 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
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/elasticsearch/elasticsearch_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class ElasticsearchService
switchMap(
(config) =>
new Observable<CoreClusterClients>((subscriber) => {
this.log.debug('Creating elasticsearch clients');
this.log.debug('Creating elasticsearch client');

const coreClients = {
config,
Expand Down
10 changes: 10 additions & 0 deletions src/core/server/elasticsearch/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ import { ServiceStatus } from '../status';
* @public
*/
export interface ElasticsearchServiceSetup {
/**
* @deprecated
* Use {@link ElasticsearchServiceStart.legacy} instead.
*
* */
legacy: {
/**
* @deprecated
Expand Down Expand Up @@ -74,6 +79,11 @@ export interface ElasticsearchServiceSetup {
* @public
*/
export interface ElasticsearchServiceStart {
/**
* @deprecated
* Provided for the backward compatibility.
* Switch to the new elasticsearch client as soon as https://github.com/elastic/kibana/issues/35508 done.
* */
legacy: {
/**
* Create application specific Elasticsearch cluster API client with customized config. See {@link IClusterClient}.
Expand Down
4 changes: 2 additions & 2 deletions src/core/server/server.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ export class ElasticsearchErrorHelpers {

// @public (undocumented)
export interface ElasticsearchServiceSetup {
// (undocumented)
// @deprecated (undocumented)
legacy: {
readonly createClient: (type: string, clientConfig?: Partial<ElasticsearchClientConfig>) => ICustomClusterClient;
readonly client: IClusterClient;
Expand All @@ -831,7 +831,7 @@ export interface ElasticsearchServiceSetup {

// @public (undocumented)
export interface ElasticsearchServiceStart {
// (undocumented)
// @deprecated (undocumented)
legacy: {
readonly createClient: (type: string, clientConfig?: Partial<ElasticsearchClientConfig>) => ICustomClusterClient;
readonly client: IClusterClient;
Expand Down

0 comments on commit fcccf96

Please sign in to comment.