More porting from rep (#2388)

* More porting from rep

* Address review feedback
This commit is contained in:
Jeff Mitchell
2017-02-16 16:29:30 -05:00
committed by GitHub
parent 98c7bd6c03
commit 8acbdefdf2
29 changed files with 405 additions and 67 deletions

View File

@@ -38,7 +38,7 @@ type Config struct {
}
// DevConfig is a Config that is used for dev mode of Vault.
func DevConfig(ha bool) *Config {
func DevConfig(ha, transactional bool) *Config {
ret := &Config{
DisableCache: false,
DisableMlock: true,
@@ -63,7 +63,12 @@ func DevConfig(ha bool) *Config {
DefaultLeaseTTL: 32 * 24 * time.Hour,
}
if ha {
switch {
case ha && transactional:
ret.Backend.Type = "inmem_transactional_ha"
case !ha && transactional:
ret.Backend.Type = "inmem_transactional"
case ha && !transactional:
ret.Backend.Type = "inmem_ha"
}