mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-21 01:09:01 +08:00
1
This commit is contained in:
@@ -11,13 +11,13 @@ import (
|
||||
|
||||
func ApiToRpc(c *gin.Context, apiReq, apiResp interface{}, rpcName string, rpcClientFunc interface{}, rpcFuncName string, tokenFunc func(token string, operationID string) (string, error)) {
|
||||
operationID := c.GetHeader("operationID")
|
||||
nCtx := trace_log.NewCtx(c, rpcFuncName)
|
||||
nCtx := trace_log.NewCtx1(c, rpcFuncName, operationID)
|
||||
//trace_log.SetOperationID(nCtx, operationID)
|
||||
defer trace_log.ShowLog(nCtx)
|
||||
if err := c.BindJSON(apiReq); err != nil {
|
||||
trace_log.WriteErrorResponse(nCtx, "BindJSON", err)
|
||||
return
|
||||
}
|
||||
trace_log.SetOperationID(nCtx, operationID)
|
||||
trace_log.SetContextInfo(nCtx, "BindJSON", nil, "params", apiReq)
|
||||
etcdConn, err := getcdv3.GetConn(c, rpcName)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user