2020-02-10 20:56:14 +00:00
|
|
|
// +build !ent
|
2017-09-19 14:47:10 +00:00
|
|
|
|
|
|
|
package state
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/hashicorp/nomad/nomad/structs"
|
|
|
|
)
|
|
|
|
|
2020-07-20 13:22:26 +00:00
|
|
|
// enterpriseInit is used to initialize the state store with enterprise
|
|
|
|
// objects.
|
|
|
|
func (s *StateStore) enterpriseInit() error {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2017-09-19 14:47:10 +00:00
|
|
|
// namespaceExists returns whether a namespace exists
|
2020-08-27 14:18:53 +00:00
|
|
|
func (s *StateStore) namespaceExists(txn *txn, namespace string) (bool, error) {
|
2017-09-19 14:47:10 +00:00
|
|
|
return namespace == structs.DefaultNamespace, nil
|
|
|
|
}
|
2017-10-13 21:36:02 +00:00
|
|
|
|
|
|
|
// updateEntWithAlloc is used to update Nomad Enterprise objects when an allocation is
|
|
|
|
// added/modified/deleted
|
2020-08-27 14:18:53 +00:00
|
|
|
func (s *StateStore) updateEntWithAlloc(index uint64, new, existing *structs.Allocation, txn *txn) error {
|
2017-10-13 21:36:02 +00:00
|
|
|
return nil
|
|
|
|
}
|
2020-05-18 17:47:13 +00:00
|
|
|
|
|
|
|
func (s *StateStore) NamespaceNames() ([]string, error) {
|
|
|
|
return []string{structs.DefaultNamespace}, nil
|
|
|
|
}
|