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"
|
|
|
|
|
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"
|
|
|
|
"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
|
2019-12-10 02:26:41 +00:00
|
|
|
func fillAgentServiceEnterpriseMeta(_ *api.AgentService, _ *structs.EnterpriseMeta) {}
|
|
|
|
|
2020-04-16 22:07:52 +00:00
|
|
|
// fillHealthCheckEnterpriseMeta is a noop stub for the func defined agent_ent.go
|
2019-12-10 02:26:41 +00:00
|
|
|
func fillHealthCheckEnterpriseMeta(_ *api.HealthCheck, _ *structs.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
|
|
|
}
|
|
|
|
|
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
|
|
|
|
2021-10-26 20:08:55 +00:00
|
|
|
func (a *Agent) AgentEnterpriseMeta() *structs.EnterpriseMeta {
|
2021-08-19 20:09:42 +00:00
|
|
|
return structs.NodeEnterpriseMetaInDefaultPartition()
|
|
|
|
}
|