JCC-CSScheduler/common/pkgs/mq/config.go

15 lines
327 B
Go

package mq
import "fmt"
type Config struct {
Address string `json:"address"`
Account string `json:"account"`
Password string `json:"password"`
VHost string `json:"vhost"`
}
func (cfg *Config) MakeConnectingURL() string {
return fmt.Sprintf("amqp://%s:%s@%s%s", cfg.Account, cfg.Password, cfg.Address, cfg.VHost)
}