审查视图

pkg/constant/kafka.go 512 字节
tangxvhui authored
1
//go:build !local
庄敏学 authored
2
// +build !local
tangxvhui authored
3
tangxvhui authored
4 5 6 7
package constant

import "os"
8
var KAFKA_HOSTS = "127.0.0.1:9092" // 1.116.151.79:9092
tangxvhui authored
9
tangxvhui authored
10
var KAFKA_GROUP_ID = "performance_dev"
tangxvhui authored
11
庄敏学 authored
12
var KAFKA_BUSINESS_TOPIC = "mmm-business-admin-dev"
tangxvhui authored
13 14 15 16 17

func init() {
	if os.Getenv("KAFKA_HOSTS") != "" {
		KAFKA_HOSTS = os.Getenv("KAFKA_HOSTS")
	}
庄敏学 authored
18 19
	if os.Getenv("KAFKA_BUSINESS_TOPIC") != "" {
		KAFKA_BUSINESS_TOPIC = os.Getenv("KAFKA_BUSINESS_TOPIC")
tangxvhui authored
20
	}
tangxvhui authored
21 22
	if os.Getenv("KAFKA_GROUP_ID") != "" {
		KAFKA_GROUP_ID = os.Getenv("KAFKA_GROUP_ID")
tangxvhui authored
23 24
	}
}