You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tool/middleware/rabbitmq/config.go

14 lines
278 B

package rabbitmq
import "os"
// GetByEnv 从env环境获取配置
func GetByEnv() Config {
return Config{
User: os.Getenv("RABBITMQ_USER"),
Password: os.Getenv("RABBITMQ_PASSWORD"),
Host: os.Getenv("RABBITMQ_HOST"),
Port: os.Getenv("RABBITMQ_PORT"),
}
}