c42950e342
and add new TestConfigForServer() to get a valid nomad.Config to use in tests Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>
39 lines
808 B
Go
39 lines
808 B
Go
//go:build !ent
|
|
|
|
package nomad
|
|
|
|
import (
|
|
autopilot "github.com/hashicorp/raft-autopilot"
|
|
)
|
|
|
|
type EnterpriseState struct{}
|
|
|
|
func (es *EnterpriseState) Features() uint64 {
|
|
return 0
|
|
}
|
|
|
|
func (es *EnterpriseState) ReloadLicense(_ *Config) error {
|
|
return nil
|
|
}
|
|
|
|
func (s *Server) setupEnterprise(config *Config) error {
|
|
// Set up the OSS version of autopilot
|
|
apDelegate := &AutopilotDelegate{s}
|
|
|
|
s.autopilot = autopilot.New(
|
|
s.raft,
|
|
apDelegate,
|
|
autopilot.WithLogger(s.logger),
|
|
autopilot.WithReconcileInterval(config.AutopilotInterval),
|
|
autopilot.WithUpdateInterval(config.ServerHealthInterval),
|
|
autopilot.WithPromoter(s.autopilotPromoter()),
|
|
)
|
|
|
|
return nil
|
|
}
|
|
func (s *Server) startEnterpriseBackground() {}
|
|
|
|
func (s *Server) entVaultDelegate() *VaultNoopDelegate {
|
|
return &VaultNoopDelegate{}
|
|
}
|