🎨 update / add nsq

This commit is contained in:
landaiqing
2024-09-28 23:36:26 +08:00
parent bd2e8b8f6c
commit 83b6fb6322
33 changed files with 1754 additions and 773 deletions

12
config/conf_nsq.go Normal file
View 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)
}

View File

@@ -13,4 +13,5 @@ type Config struct {
Swagger Swagger `yaml:"swagger"`
Casbin Casbin `yaml:"casbin"`
MongoDB MongoDB `yaml:"mongodb"`
NSQ NSQ `yaml:"nsq"`
}