0af749c92e
This commit wraps memdb.DB with a changeTrackerDB, which is a thin wrapper around memdb.DB which enables go-memdb's TrackChanges on all write transactions. When the transaction is comitted the changes are sent to an eventPublisher which will be used to create and emit change events. debugging TestFSM_ReconcileSummaries wip revert back rebase revert back rebase fix snapshot to actually use a snapshot
29 lines
764 B
Go
29 lines
764 B
Go
// +build !ent
|
|
|
|
package state
|
|
|
|
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 *txn, namespace string) (bool, error) {
|
|
return namespace == structs.DefaultNamespace, nil
|
|
}
|
|
|
|
// updateEntWithAlloc is used to update Nomad Enterprise objects when an allocation is
|
|
// added/modified/deleted
|
|
func (s *StateStore) updateEntWithAlloc(index uint64, new, existing *structs.Allocation, txn *txn) error {
|
|
return nil
|
|
}
|
|
|
|
func (s *StateStore) NamespaceNames() ([]string, error) {
|
|
return []string{structs.DefaultNamespace}, nil
|
|
}
|