mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-26 19:46:57 +08:00
zk add client options
This commit is contained in:
parent
8a44305440
commit
cf29bd6227
@ -39,6 +39,10 @@ func Start(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) e
|
|||||||
|
|
||||||
func (s *authServer) UserToken(ctx context.Context, req *pbAuth.UserTokenReq) (*pbAuth.UserTokenResp, error) {
|
func (s *authServer) UserToken(ctx context.Context, req *pbAuth.UserTokenReq) (*pbAuth.UserTokenResp, error) {
|
||||||
log.Info("", "rpc come UserToken")
|
log.Info("", "rpc come UserToken")
|
||||||
|
operationID, ok := ctx.Value(constant.OperationID).(string)
|
||||||
|
if !ok {
|
||||||
|
log.Error("2222", "ctx missing operationID", operationID)
|
||||||
|
}
|
||||||
resp := pbAuth.UserTokenResp{}
|
resp := pbAuth.UserTokenResp{}
|
||||||
if _, err := s.userCheck.GetUserInfo(ctx, req.UserID); err != nil {
|
if _, err := s.userCheck.GetUserInfo(ctx, req.UserID); err != nil {
|
||||||
log.Info("", "UserToken err:", err.Error())
|
log.Info("", "UserToken err:", err.Error())
|
||||||
|
@ -58,6 +58,7 @@ func rpcClientInterceptor(ctx context.Context, method string, req, reply interfa
|
|||||||
}
|
}
|
||||||
operationID, ok := ctx.Value(constant.OperationID).(string)
|
operationID, ok := ctx.Value(constant.OperationID).(string)
|
||||||
if !ok {
|
if !ok {
|
||||||
|
log.Error("1111", "ctx missing operationID")
|
||||||
return errs.ErrArgs.Wrap("ctx missing operationID")
|
return errs.ErrArgs.Wrap("ctx missing operationID")
|
||||||
}
|
}
|
||||||
md := metadata.Pairs(constant.OperationID, operationID)
|
md := metadata.Pairs(constant.OperationID, operationID)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user