File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ const (
23
23
)
24
24
25
25
const (
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"
29
30
)
Original file line number Diff line number Diff line change @@ -35,6 +35,10 @@ var invocationType = reflect.TypeOf(rpcinfo.NewServerInvocation()).Elem()
35
35
36
36
func constructServerCtxWithMetadata (cliCtx context.Context ) (serverCtx context.Context ) {
37
37
serverCtx = context .Background ()
38
+ customVal := cliCtx .Value (consts .SERVICE_INLINE_CUSTOM_CTX_KEY )
39
+ if customVal != nil {
40
+ serverCtx = context .WithValue (serverCtx , consts .SERVICE_INLINE_CUSTOM_CTX_KEY , customVal )
41
+ }
38
42
// metainfo
39
43
// forward transmission
40
44
kvs := make (map [string ]string , 16 )
You can’t perform that action at this time.
0 commit comments