open-nomad/nomad/server_setup_oss.go

38 lines
833 B
Go
Raw Normal View History

//go:build !ent
2020-05-28 19:40:17 +00:00
// +build !ent
2017-09-19 14:47:10 +00:00
package nomad
2018-09-15 23:23:13 +00:00
import (
"github.com/hashicorp/consul/agent/consul/autopilot"
)
// LicenseConfig allows for tunable licensing config
// primarily used for enterprise testing
type LicenseConfig struct {
AdditionalPubKeys []string
}
2017-09-19 14:47:10 +00:00
type EnterpriseState struct{}
func (es *EnterpriseState) Features() uint64 {
return 0
}
func (es *EnterpriseState) ReloadLicense(_ *Config) error {
return nil
}
2017-09-19 14:47:10 +00:00
func (s *Server) setupEnterprise(config *Config) error {
// Set up the OSS version of autopilot
apDelegate := &AutopilotDelegate{s}
2020-02-14 00:06:17 +00:00
s.autopilot = autopilot.NewAutopilot(s.logger, apDelegate, config.AutopilotInterval, config.ServerHealthInterval)
2017-09-19 14:47:10 +00:00
return nil
}
func (s *Server) startEnterpriseBackground() {}
func (s *Server) entVaultDelegate() *VaultNoopDelegate {
return &VaultNoopDelegate{}
}