enterprise specific state store objects

This commit is contained in:
Mahmood Ali
2020-07-20 09:22:26 -04:00
parent 32910ae0ba
commit 040cc8f5af
2 changed files with 12 additions and 0 deletions

View File

@@ -80,6 +80,12 @@ func NewStateStore(config *StateStoreConfig) (*StateStore, error) {
config: config,
abandonCh: make(chan struct{}),
}
// Initialize the state store with required enterprise objects
if err := s.enterpriseInit(); err != nil {
return nil, fmt.Errorf("enterprise state store initialization failed: %v", err)
}
return s, nil
}

View File

@@ -7,6 +7,12 @@ import (
"github.com/hashicorp/nomad/nomad/structs"
)
// enterpriseInit is used to initialize the state store with enterprise
// objects.
func (s *StateStore) enterpriseInit() error {
return nil
}
// namespaceExists returns whether a namespace exists
func (s *StateStore) namespaceExists(txn *memdb.Txn, namespace string) (bool, error) {
return namespace == structs.DefaultNamespace, nil