1234567891011121314151617181920212223242526272829303132 |
- package config
- import (
- "github.com/zeromicro/go-zero/core/conf"
- "github.com/zeromicro/go-zero/zrpc"
- )
- type Config struct {
- zrpc.RpcServerConf
- Node int // 节点
- CalleeId string // 服务名字
- FileSystemConf zrpc.RpcClientConf
- Mysql Mysql
- ResourceEtcdConf zrpc.RpcClientConf //资源中台
- }
- var (
- ConfigJson Config
- )
- type Mysql struct {
- DbName string `json:"dbName"`
- Address string `json:"address"`
- UserName string `json:"userName"`
- PassWord string `json:"passWord"`
- MaxOpenConns int `json:"maxOpenConns"`
- MaxIdleConns int `json:"maxIdleConns"`
- }
- func init() {
- conf.MustLoad("etc/usercenter.yaml", &ConfigJson)
- }
|