Add elsCAPath opt and improve opt comments

This commit is contained in:
ionutboangiu
2024-11-27 19:08:41 +02:00
committed by Dan Christian Bogos
parent e982499e71
commit 2511c00db7
7 changed files with 42 additions and 35 deletions

View File

@@ -74,8 +74,8 @@ func (e *ElasticEE) parseClientOpts() error {
if opts.APIKey != nil {
e.clientCfg.APIKey = *opts.APIKey
}
if e.Cfg().Opts.RPC.CAPath != nil {
cacert, err := os.ReadFile(*e.Cfg().Opts.RPC.CAPath)
if opts.CAPath != nil {
cacert, err := os.ReadFile(*opts.CAPath)
if err != nil {
return err
}