diff --git a/vault/dynamic_system_view.go b/vault/dynamic_system_view.go index 6b24459265..5588c43d5d 100644 --- a/vault/dynamic_system_view.go +++ b/vault/dynamic_system_view.go @@ -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() +} diff --git a/vault/dynamic_system_view_ext.go b/vault/dynamic_system_view_ext.go deleted file mode 100644 index 1433e5e6be..0000000000 --- a/vault/dynamic_system_view_ext.go +++ /dev/null @@ -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 -}