-
Notifications
You must be signed in to change notification settings - Fork 892
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support legacy client for data source
Signed-off-by: Su <szhongna@amazon.com>
- Loading branch information
1 parent
aff6595
commit f337d6c
Showing
14 changed files
with
341 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { ConfigOptions } from 'elasticsearch'; | ||
import { DataSourcePluginConfigType } from '../../config'; | ||
|
||
/** | ||
* Parse the client options from given data source config and endpoint | ||
* | ||
* @param config The config to generate the client options from. | ||
* @param endpoint endpoint url of data source | ||
*/ | ||
export function parseClientOptions( | ||
// TODO: will use client configs, that comes from a merge result of user config and default legacy client config, | ||
config: DataSourcePluginConfigType, | ||
endpoint: string | ||
): ConfigOptions { | ||
const configOptions: ConfigOptions = { | ||
host: endpoint, | ||
ssl: { | ||
rejectUnauthorized: true, | ||
}, | ||
}; | ||
|
||
return configOptions; | ||
} |
Oops, something went wrong.