kafka.go 519 字节
//go:build !local

package constant

import "os"

var KAFKA_HOSTS = "127.7.8.1:9094" // 1.116.151.79:9092

var KAFKA_GROUP_ID = "performance_dev"

var KAFKA_BUSINESS_ADMIN_TOPIC = "mmm-business-admin-dev"

func init() {
	if os.Getenv("KAFKA_HOSTS") != "" {
		KAFKA_HOSTS = os.Getenv("KAFKA_HOSTS")
	}
	if os.Getenv("KAFKA_BUSINESS_ADMIN_TOPIC") != "" {
		KAFKA_BUSINESS_ADMIN_TOPIC = os.Getenv("KAFKA_BUSINESS_ADMIN_TOPIC")
	}
	if os.Getenv("KAFKA_GROUP_ID") != "" {
		KAFKA_GROUP_ID = os.Getenv("KAFKA_GROUP_ID")
	}
}