mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-03 20:40:45 -05:00
gocql: DisableInitialHostLookup as backend configuration parameter (#9733)
* setting option for gocql: DisableInitialHostLookup thru backend config section * adding newline between 'if' blocks to keep code strict --------- Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
This commit is contained in:
parent
1c4aa5369e
commit
f11f4643cf
1 changed files with 8 additions and 0 deletions
|
|
@ -150,6 +150,14 @@ func NewCassandraBackend(conf map[string]string, logger log.Logger) (physical.Ba
|
|||
cluster.Timeout = time.Duration(connectionTimeout) * time.Second
|
||||
}
|
||||
|
||||
if disableInitialHostLookupStr, ok := conf["disable_host_initial_lookup"]; ok {
|
||||
disableInitialHostLookup, err := strconv.ParseBool(disableInitialHostLookupStr)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("'disable_host_initial_lookup' must be a bool")
|
||||
}
|
||||
cluster.DisableInitialHostLookup = disableInitialHostLookup
|
||||
}
|
||||
|
||||
if err := setupCassandraTLS(conf, cluster); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue