Skip to content

Commit

Permalink
Add a super admin client builder w/ hosts params (opensearch-project#322
Browse files Browse the repository at this point in the history
) (opensearch-project#323)

Signed-off-by: bowenlan-amzn <[email protected]>

Signed-off-by: bowenlan-amzn <[email protected]>
(cherry picked from commit 050c95d)

Co-authored-by: bowenlan-amzn <[email protected]>
  • Loading branch information
1 parent c49b54d commit 6b16d7b
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@ public SecureRestClientBuilder(Settings settings, Path configPath) {
hosts.add(new HttpHost(host, port, httpSSLEnabled ? ConfigConstants.HTTPS : ConfigConstants.HTTP));
}

public SecureRestClientBuilder(Settings settings, Path configPath, HttpHost[] httpHosts) {
this.httpSSLEnabled = settings.getAsBoolean(ConfigConstants.OPENSEARCH_SECURITY_SSL_HTTP_ENABLED, false);
this.settings = settings;
this.configPath = configPath;
this.user = null;
this.passwd = null;
hosts.addAll(Arrays.asList(httpHosts));
}

/**
* Creates a low-level Rest client.
* @return
Expand Down

0 comments on commit 6b16d7b

Please sign in to comment.