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

Function AddSourceIPsToOutgoingContext

pkg/util/extract_forwarded.go:35–40  ·  view source on GitHub ↗

AddSourceIPsToOutgoingContext adds the given source to the GRPC context

(ctx context.Context, source string)

Source from the content-addressed store, hash-verified

33
34// AddSourceIPsToOutgoingContext adds the given source to the GRPC context
35func AddSourceIPsToOutgoingContext(ctx context.Context, source string) context.Context {
36 if source != "" {
37 ctx = metadata.AppendToOutgoingContext(ctx, ipAddressesKey, source)
38 }
39 return ctx
40}
41
42// AddSourceIPsToIncomingContext adds the given source to the GRPC context
43func AddSourceIPsToIncomingContext(ctx context.Context, source string) context.Context {

Callers 3

doBatchMethod · 0.92
HandlerFunction · 0.92
OTLPHandlerFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected