mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +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) {
|
||||
log.Info("", "rpc come UserToken")
|
||||
operationID, ok := ctx.Value(constant.OperationID).(string)
|
||||
if !ok {
|
||||
log.Error("2222", "ctx missing operationID", operationID)
|
||||
}
|
||||
resp := pbAuth.UserTokenResp{}
|
||||
if _, err := s.userCheck.GetUserInfo(ctx, req.UserID); err != nil {
|
||||
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)
|
||||
if !ok {
|
||||
log.Error("1111", "ctx missing operationID")
|
||||
return errs.ErrArgs.Wrap("ctx missing operationID")
|
||||
}
|
||||
md := metadata.Pairs(constant.OperationID, operationID)
|
||||
|
Loading…
x
Reference in New Issue
Block a user