mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
Internal user rpc service initial commit
This commit is contained in:
parent
2c3d0ae0e8
commit
5eba5e8c9b
16
src/rpc/user/internal_service/get_user_info_to_client.go
Normal file
16
src/rpc/user/internal_service/get_user_info_to_client.go
Normal file
@ -0,0 +1,16 @@
|
||||
package internal_service
|
||||
|
||||
import (
|
||||
"Open_IM/src/common/config"
|
||||
pbUser "Open_IM/src/proto/user"
|
||||
"context"
|
||||
"github.com/skiffer-git/grpc-etcdv3/getcdv3"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func GetUserInfoClient(req *pbUser.GetUserInfoReq) (*pbUser.GetUserInfoResp, error) {
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName)
|
||||
client := pbUser.NewUserClient(etcdConn)
|
||||
RpcResp, err := client.GetUserInfo(context.Background(), req)
|
||||
return RpcResp, err
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user