MCPcopy Create free account
hub / github.com/cortexproject/cortex / HTTPHeaderPropagationClientInterceptor

Function HTTPHeaderPropagationClientInterceptor

pkg/util/grpcutil/util.go:69–73  ·  view source on GitHub ↗

HTTPHeaderPropagationClientInterceptor allows for propagation of HTTP Request headers across gRPC calls - works alongside HTTPHeaderPropagationServerInterceptor

(ctx context.Context, method string, req, reply any, cc *grpc.ClientConn,
	invoker grpc.UnaryInvoker, opts ...grpc.CallOption)

Source from the content-addressed store, hash-verified

67// HTTPHeaderPropagationClientInterceptor allows for propagation of HTTP Request headers across gRPC calls - works
68// alongside HTTPHeaderPropagationServerInterceptor
69func HTTPHeaderPropagationClientInterceptor(ctx context.Context, method string, req, reply any, cc *grpc.ClientConn,
70 invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
71 ctx = injectForwardedRequestMetadata(ctx)
72 return invoker(ctx, method, req, reply, cc, opts...)
73}
74
75// HTTPHeaderPropagationStreamClientInterceptor does the same as HTTPHeaderPropagationClientInterceptor but for streams
76func HTTPHeaderPropagationStreamClientInterceptor(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string,

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected