mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-29 17:52:32 +00: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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user