update invoke
This commit is contained in:
parent
a1490b41db
commit
60f7eb1225
@ -34,12 +34,23 @@ func ClientContextInvokerChain(ctx context.Context, method string, req, res inte
|
|||||||
return invoker(ctx, method, req, nil, cc, opts...)
|
return invoker(ctx, method, req, nil, cc, opts...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Context Unary Interceptor
|
||||||
|
* @param void
|
||||||
|
* @author dc.To
|
||||||
|
* @version 20250425
|
||||||
|
*/
|
||||||
|
func ClientContextUnaryChain(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
|
||||||
|
|
||||||
|
return handler(ctx, req)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Metadata Unary Interceptor
|
* Metadata Unary Interceptor
|
||||||
* @author dc.To
|
* @author dc.To
|
||||||
* @version 20250418
|
* @version 20250418
|
||||||
*/
|
*/
|
||||||
func ClientMetadataUnaryChian(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
|
func ClientMetadataUnaryChain(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
|
||||||
md, ok := metadata.FromIncomingContext(ctx)
|
md, ok := metadata.FromIncomingContext(ctx)
|
||||||
if ok {
|
if ok {
|
||||||
for k, v := range md {
|
for k, v := range md {
|
||||||
Loading…
x
Reference in New Issue
Block a user