2023-03-28 18:39:22 +00:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
2021-11-16 18:04:01 +00:00
|
|
|
//go:build !consulent
|
2019-12-06 20:35:58 +00:00
|
|
|
// +build !consulent
|
|
|
|
|
|
|
|
package agent
|
|
|
|
|
2019-12-10 02:26:41 +00:00
|
|
|
import (
|
2021-05-11 14:50:03 +00:00
|
|
|
"context"
|
|
|
|
|
2022-04-05 21:10:06 +00:00
|
|
|
"github.com/hashicorp/consul/acl"
|
2020-02-04 20:58:56 +00:00
|
|
|
"github.com/hashicorp/consul/agent/config"
|
2019-12-10 02:26:41 +00:00
|
|
|
"github.com/hashicorp/consul/agent/consul"
|
2022-06-01 15:18:06 +00:00
|
|
|
"github.com/hashicorp/consul/agent/proxycfg"
|
2019-12-10 02:26:41 +00:00
|
|
|
"github.com/hashicorp/consul/agent/structs"
|
|
|
|
"github.com/hashicorp/consul/api"
|
|
|
|
)
|
|
|
|
|
2020-04-17 20:27:39 +00:00
|
|
|
// enterpriseAgent embeds fields that we only access in consul-enterprise builds
|
|
|
|
type enterpriseAgent struct{}
|
|
|
|
|
2020-04-16 22:07:52 +00:00
|
|
|
// fillAgentServiceEnterpriseMeta is a noop stub for the func defined agent_ent.go
|
2022-04-05 21:10:06 +00:00
|
|
|
func fillAgentServiceEnterpriseMeta(_ *api.AgentService, _ *acl.EnterpriseMeta) {}
|
2019-12-10 02:26:41 +00:00
|
|
|
|
2020-04-16 22:07:52 +00:00
|
|
|
// fillHealthCheckEnterpriseMeta is a noop stub for the func defined agent_ent.go
|
2022-04-05 21:10:06 +00:00
|
|
|
func fillHealthCheckEnterpriseMeta(_ *api.HealthCheck, _ *acl.EnterpriseMeta) {}
|
2019-12-06 20:35:58 +00:00
|
|
|
|
2020-04-16 22:07:52 +00:00
|
|
|
// initEnterprise is a noop stub for the func defined agent_ent.go
|
|
|
|
func (a *Agent) initEnterprise(consulCfg *consul.Config) error {
|
|
|
|
return nil
|
2019-12-06 20:35:58 +00:00
|
|
|
}
|
2020-02-04 20:58:56 +00:00
|
|
|
|
2020-04-16 22:07:52 +00:00
|
|
|
// reloadEnterprise is a noop stub for the func defined agent_ent.go
|
|
|
|
func (a *Agent) reloadEnterprise(conf *config.RuntimeConfig) error {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-04-28 13:42:46 +00:00
|
|
|
// enterpriseConsulConfig is a noop stub for the func defined in agent_ent.go
|
2020-07-29 17:49:52 +00:00
|
|
|
func enterpriseConsulConfig(_ *consul.Config, _ *config.RuntimeConfig) {
|
2020-04-28 13:42:46 +00:00
|
|
|
}
|
|
|
|
|
2023-05-31 14:01:44 +00:00
|
|
|
// validateFIPSConfig is a noop stub for the func defined in agent_ent.go
|
|
|
|
func validateFIPSConfig(_ *config.RuntimeConfig) error {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-04-16 22:07:52 +00:00
|
|
|
// WriteEvent is a noop stub for the func defined agent_ent.go
|
|
|
|
func (a *Agent) WriteEvent(eventType string, payload interface{}) {
|
|
|
|
}
|
2021-05-11 14:50:03 +00:00
|
|
|
|
|
|
|
// startLicenseManager is used to start the license management process
|
|
|
|
func (a *Agent) startLicenseManager(_ context.Context) error {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// stopLicenseManager is used to stop the license management go routines
|
|
|
|
func (a *Agent) stopLicenseManager() {}
|
|
|
|
|
|
|
|
// enterpriseStats outputs all the Agent stats specific to Consul Enterprise
|
|
|
|
func (a *Agent) enterpriseStats() map[string]map[string]string {
|
|
|
|
return nil
|
|
|
|
}
|
2021-08-19 20:09:42 +00:00
|
|
|
|
2022-04-05 21:10:06 +00:00
|
|
|
func (a *Agent) AgentEnterpriseMeta() *acl.EnterpriseMeta {
|
2021-08-19 20:09:42 +00:00
|
|
|
return structs.NodeEnterpriseMetaInDefaultPartition()
|
|
|
|
}
|
2021-10-26 00:30:02 +00:00
|
|
|
|
|
|
|
func (a *Agent) registerEntCache() {}
|
2022-06-01 15:18:06 +00:00
|
|
|
|
|
|
|
func (*Agent) fillEnterpriseProxyDataSources(*proxycfg.DataSources) {}
|