|
@@ -4,10 +4,7 @@
|
|
|
package model
|
|
|
|
|
|
import (
|
|
|
- "bp.jydev.jianyu360.cn/BaseService/resourceCenter/rpc/resource"
|
|
|
"fmt"
|
|
|
- "github.com/zeromicro/go-zero/core/discov"
|
|
|
- "github.com/zeromicro/go-zero/zrpc"
|
|
|
"log"
|
|
|
|
|
|
"app.yhyue.com/moapp/jyInfo/entity"
|
|
@@ -21,8 +18,6 @@ var Mysql *mysql.Mysql
|
|
|
var NsqConfig *entity.NsqStruct
|
|
|
var SupplyTotal int
|
|
|
var Sensitive *entity.Sensitive
|
|
|
-var ResourceCenterRpc resource.Resource
|
|
|
-var FuncCode string
|
|
|
|
|
|
func SupplyTotalConfig(mm int) {
|
|
|
SupplyTotal = mm
|
|
@@ -78,15 +73,3 @@ func InitSensitive(ss *entity.Sensitive) {
|
|
|
//初始化 Sensitive
|
|
|
Sensitive = ss
|
|
|
}
|
|
|
-
|
|
|
-func InitResourceCenterRpc(cf *entity.ResourceCenter, fc string) {
|
|
|
- var hosts []string
|
|
|
- hosts = append(hosts, cf.Hosts)
|
|
|
- FuncCode = fc
|
|
|
- ResourceCenterRpc = resource.NewResource(zrpc.MustNewClient(zrpc.RpcClientConf{
|
|
|
- Etcd: discov.EtcdConf{
|
|
|
- Key: cf.Key,
|
|
|
- Hosts: hosts,
|
|
|
- },
|
|
|
- }))
|
|
|
-}
|