2019-05-01 15:11:27 +00:00
|
|
|
// +build !consulent
|
2018-05-24 14:36:42 +00:00
|
|
|
|
|
|
|
package consul
|
|
|
|
|
|
|
|
import (
|
2020-06-26 21:59:15 +00:00
|
|
|
"errors"
|
2018-05-24 14:36:42 +00:00
|
|
|
"net"
|
2020-06-26 21:59:15 +00:00
|
|
|
"strings"
|
2018-05-24 14:36:42 +00:00
|
|
|
|
|
|
|
"github.com/hashicorp/consul/agent/pool"
|
2019-10-30 16:42:39 +00:00
|
|
|
"github.com/hashicorp/consul/agent/structs"
|
2019-07-26 19:57:57 +00:00
|
|
|
"github.com/hashicorp/go-version"
|
2018-05-24 14:36:42 +00:00
|
|
|
"github.com/hashicorp/serf/serf"
|
|
|
|
)
|
|
|
|
|
2019-07-26 19:57:57 +00:00
|
|
|
var (
|
|
|
|
// minMultiDCConnectVersion is the minimum version in order to support multi-DC Connect
|
|
|
|
// features.
|
|
|
|
minMultiDCConnectVersion = version.Must(version.NewVersion("1.6.0"))
|
|
|
|
)
|
|
|
|
|
2018-05-24 14:36:42 +00:00
|
|
|
type EnterpriseServer struct{}
|
|
|
|
|
|
|
|
func (s *Server) initEnterprise() error {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Server) startEnterprise() error {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Server) handleEnterpriseUserEvents(event serf.UserEvent) bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Server) handleEnterpriseRPCConn(rtype pool.RPCType, conn net.Conn, isTLS bool) bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2020-03-09 20:59:02 +00:00
|
|
|
func (s *Server) handleEnterpriseNativeTLSConn(alpnProto string, conn net.Conn) bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2019-09-11 09:01:37 +00:00
|
|
|
func (s *Server) handleEnterpriseLeave() {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2018-05-24 14:36:42 +00:00
|
|
|
func (s *Server) enterpriseStats() map[string]map[string]string {
|
|
|
|
return nil
|
|
|
|
}
|
2019-09-24 00:09:56 +00:00
|
|
|
|
|
|
|
func (s *Server) establishEnterpriseLeadership() error {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *Server) revokeEnterpriseLeadership() error {
|
|
|
|
return nil
|
|
|
|
}
|
2019-10-30 16:42:39 +00:00
|
|
|
|
|
|
|
func (s *Server) validateEnterpriseRequest(entMeta *structs.EnterpriseMeta, write bool) error {
|
|
|
|
return nil
|
|
|
|
}
|
2020-01-29 18:21:38 +00:00
|
|
|
|
2020-06-26 21:59:15 +00:00
|
|
|
func (s *Server) validateEnterpriseIntentionNamespace(ns string, _ bool) error {
|
|
|
|
if ns == "" {
|
|
|
|
return nil
|
|
|
|
} else if strings.ToLower(ns) == structs.IntentionDefaultNamespace {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// No special handling for wildcard namespaces as they are pointless in OSS.
|
|
|
|
|
|
|
|
return errors.New("Namespaces is a Consul Enterprise feature")
|
|
|
|
}
|
|
|
|
|
2020-01-29 18:21:38 +00:00
|
|
|
func (_ *Server) addEnterpriseSerfTags(_ map[string]string) {
|
|
|
|
// do nothing
|
|
|
|
}
|
2020-03-16 16:54:45 +00:00
|
|
|
|
|
|
|
// updateEnterpriseSerfTags in enterprise will update any instances of Serf with the tag that
|
|
|
|
// are not the normal LAN or WAN serf instances (network segments and network areas)
|
|
|
|
func (_ *Server) updateEnterpriseSerfTags(_, _ string) {
|
|
|
|
// do nothing
|
|
|
|
}
|