File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ const (
2323)
2424
2525const (
26- SERVICE_INLINE_RPCINFO_KEY = "SERVICE_INLINE_RPCINFO_KEY"
27- SERVICE_INLINE_SERVICE_NAME = "SERVICE_INLINE_SERVICE_NAME"
28- SERVICE_INLINE_DATA_KEY = "SERVICE_INLINE_DATA_KEY"
26+ SERVICE_INLINE_RPCINFO_KEY = "SERVICE_INLINE_RPCINFO_KEY"
27+ SERVICE_INLINE_SERVICE_NAME = "SERVICE_INLINE_SERVICE_NAME"
28+ SERVICE_INLINE_DATA_KEY = "SERVICE_INLINE_DATA_KEY"
29+ SERVICE_INLINE_CUSTOM_CTX_KEY = "SERVICE_INLINE_CUSTOM_CTX_KEY"
2930)
Original file line number Diff line number Diff line change @@ -37,6 +37,10 @@ var invocationType = reflect.TypeOf(rpcinfo.NewServerInvocation()).Elem()
3737
3838func constructServerCtxWithMetadata (cliCtx context.Context ) (serverCtx context.Context ) {
3939 serverCtx = context .Background ()
40+ customVal := cliCtx .Value (consts .SERVICE_INLINE_CUSTOM_CTX_KEY )
41+ if customVal != nil {
42+ serverCtx = context .WithValue (serverCtx , consts .SERVICE_INLINE_CUSTOM_CTX_KEY , customVal )
43+ }
4044 // metainfo
4145 // forward transmission
4246 kvs := make (map [string ]string , 16 )
You can’t perform that action at this time.
0 commit comments