Rejig dynamic system view to build without tags

This commit is contained in:
Jeff Mitchell 2017-01-12 15:13:47 -05:00
parent 7160809f49
commit a2c9f18f64
2 changed files with 11 additions and 8 deletions

View File

@ -6,6 +6,12 @@ import (
"github.com/hashicorp/vault/logical"
)
var (
sysViewIsPrimaryFunc = func() bool {
return true
}
)
type dynamicSystemView struct {
core *Core
mountEntry *MountEntry
@ -74,3 +80,8 @@ func (d dynamicSystemView) Tainted() bool {
func (d dynamicSystemView) CachingDisabled() bool {
return d.core.cachingDisabled
}
// Checks if this is a primary Vault instance.
func (d dynamicSystemView) IsPrimary() bool {
return sysViewIsPrimaryFunc()
}

View File

@ -1,8 +0,0 @@
// +build vault,!ent
package vault
// IsPrimary checks if this is a primary Vault instance.
func (d dynamicSystemView) IsPrimary() bool {
return true
}