🎨 update / add nsq
This commit is contained in:
12
config/conf_nsq.go
Normal file
12
config/conf_nsq.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package config
|
||||
|
||||
import "fmt"
|
||||
|
||||
type NSQ struct {
|
||||
Host string `yaml:"host"`
|
||||
Port int `yaml:"port"`
|
||||
}
|
||||
|
||||
func (n *NSQ) Addr() string {
|
||||
return fmt.Sprintf("%s:%d", n.Host, n.Port)
|
||||
}
|
@@ -13,4 +13,5 @@ type Config struct {
|
||||
Swagger Swagger `yaml:"swagger"`
|
||||
Casbin Casbin `yaml:"casbin"`
|
||||
MongoDB MongoDB `yaml:"mongodb"`
|
||||
NSQ NSQ `yaml:"nsq"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user