Browse Source

增加配置文件读取

dev
zhangyuxiang 2 weeks ago
parent
commit
beb552607f
  1. 6
      config/configStruct.go
  2. 2
      consumers/HBJCAS/config.go

6
config/configStruct.go

@ -18,9 +18,9 @@ type MqttConfig struct {
Topics []string `json:"topics" yaml:"topics"` Topics []string `json:"topics" yaml:"topics"`
} }
type KafkaConfig struct { type KafkaConfig struct {
Brokers []string `json:"brokers"` Brokers []string `json:"brokers" yaml:"brokers"`
GroupId string `json:"groupId"` GroupId string `json:"groupId" yaml:"groupId"`
Topics []string `json:"topics"` Topics []string `json:"topics" yaml:"topics"`
} }
type EsConfig struct { type EsConfig struct {

2
consumers/HBJCAS/config.go

@ -20,7 +20,7 @@ type ioConfig struct {
} }
type In struct { type In struct {
Http config.HttpConfig `yaml:"http"` Http config.HttpConfig `yaml:"http"`
Kafka config.KafkaConfig `json:"kafka"` Kafka config.KafkaConfig `yaml:"kafka"`
} }
type Out struct { type Out struct {

Loading…
Cancel
Save