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
)

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

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

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 050c95d

Please sign in to comment.