refactor(*): modify the position of IsEnterprise

This commit is contained in:
qevolg 2024-10-18 16:43:41 +08:00
parent cbd262541e
commit 936efc7529
3 changed files with 5 additions and 5 deletions

View File

@ -14,8 +14,6 @@ import (
"github.com/taosdata/taoskeeper/version" "github.com/taosdata/taoskeeper/version"
) )
var IsEnterprise = "false"
var Name = fmt.Sprintf("%skeeper", version.CUS_PROMPT) var Name = fmt.Sprintf("%skeeper", version.CUS_PROMPT)
const ReqIDKey = "QID" const ReqIDKey = "QID"
@ -228,7 +226,7 @@ func init() {
initLog() initLog()
if IsEnterprise == "true" { if version.IsEnterprise == "true" {
initAudit() initAudit()
} }
} }

View File

@ -48,7 +48,7 @@ func Init() *http.Server {
node := api.NewNodeExporter(processor) node := api.NewNodeExporter(processor)
node.Init(router) node.Init(router)
if config.IsEnterprise == "true" { if version.IsEnterprise == "true" {
zabbix := api.NewZabbix(processor) zabbix := api.NewZabbix(processor)
zabbix.Init(router) zabbix.Init(router)
} }
@ -57,7 +57,7 @@ func Init() *http.Server {
checkHealth := api.NewCheckHealth(version.Version) checkHealth := api.NewCheckHealth(version.Version)
checkHealth.Init(router) checkHealth.Init(router)
if config.IsEnterprise == "true" { if version.IsEnterprise == "true" {
if conf.Audit.Enable { if conf.Audit.Enable {
audit, err := api.NewAudit(conf) audit, err := api.NewAudit(conf)
if err != nil { if err != nil {

View File

@ -7,3 +7,5 @@ var CommitID = "unknown"
var CUS_NAME = "TDengine" var CUS_NAME = "TDengine"
var CUS_PROMPT = "taos" var CUS_PROMPT = "taos"
var IsEnterprise = "false"