1234567891011121314151617181920 |
- package config
- var (
- _rocketmqConfig *RocketmqConfig
- )
- type RocketmqConfig struct {
- Url string `yaml:"url,omitempty"`
- Port int `yaml:"port,omitempty"`
- }
- func InitRocketmq(path string) {
- var config RocketmqConfig
- readConfig(path, &config)
- _rocketmqConfig = &config
- }
- func GetRocketmqConfig() RocketmqConfig {
- return *_rocketmqConfig
- }
|