open-nomad/nomad/server_setup_oss.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
878 B
Go
Raw Permalink Normal View History

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
//go:build !ent
2017-09-19 14:47:10 +00:00
package nomad
2018-09-15 23:23:13 +00:00
import (
autopilot "github.com/hashicorp/raft-autopilot"
2018-09-15 23:23:13 +00:00
)
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}
s.autopilot = autopilot.New(
s.raft,
apDelegate,
autopilot.WithLogger(s.logger),
autopilot.WithReconcileInterval(config.AutopilotInterval),
autopilot.WithUpdateInterval(config.ServerHealthInterval),
autopilot.WithPromoter(s.autopilotPromoter()),
)
2017-09-19 14:47:10 +00:00
return nil
}
func (s *Server) startEnterpriseBackground() {}
func (s *Server) entVaultDelegate() *VaultNoopDelegate {
return &VaultNoopDelegate{}
}