|
@@ -5,6 +5,7 @@ import (
|
|
|
"bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
|
|
|
"bp.jydev.jianyu360.cn/BaseService/resourceCenter/rpc/resource"
|
|
|
"bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/usercenter"
|
|
|
+ "github.com/zeromicro/go-zero/core/discov"
|
|
|
"github.com/zeromicro/go-zero/zrpc"
|
|
|
)
|
|
|
|
|
@@ -19,19 +20,19 @@ func NewServiceContext(c config.Config) *ServiceContext {
|
|
|
return &ServiceContext{
|
|
|
Config: c,
|
|
|
BiServiceRpc: biservice.NewBiService(zrpc.MustNewClient(c.BiServiceRpc)),
|
|
|
- /*ResourceCenterRpc: resource.NewResource(zrpc.MustNewClient(zrpc.RpcClientConf{
|
|
|
+ ResourceCenterRpc: resource.NewResource(zrpc.MustNewClient(zrpc.RpcClientConf{
|
|
|
Etcd: discov.EtcdConf{
|
|
|
- //Hosts: c.BiServiceRpc.Etcd.Hosts,
|
|
|
- Hosts: []string{"192.168.3.149:2379"},
|
|
|
- Key: c.ResourceCenterKey,
|
|
|
+ Hosts: c.BiServiceRpc.Etcd.Hosts,
|
|
|
+ //Hosts: []string{"192.168.3.149:2379"},
|
|
|
+ Key: c.ResourceCenterKey,
|
|
|
},
|
|
|
})),
|
|
|
UserCenterRpc: usercenter.NewUserCenter(zrpc.MustNewClient(zrpc.RpcClientConf{
|
|
|
Etcd: discov.EtcdConf{
|
|
|
- //Hosts: c.BiServiceRpc.Etcd.Hosts,
|
|
|
- Hosts: []string{"192.168.3.149:2379"},
|
|
|
- Key: c.UserCenterKey,
|
|
|
+ Hosts: c.BiServiceRpc.Etcd.Hosts,
|
|
|
+ //Hosts: []string{"192.168.3.149:2379"},
|
|
|
+ Key: c.UserCenterKey,
|
|
|
},
|
|
|
- })),*/
|
|
|
+ })),
|
|
|
}
|
|
|
}
|