AddSourceIPsToOutgoingContext adds the given source to the GRPC context
(ctx context.Context, source string)
| 33 | |
| 34 | // AddSourceIPsToOutgoingContext adds the given source to the GRPC context |
| 35 | func 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 |
| 43 | func AddSourceIPsToIncomingContext(ctx context.Context, source string) context.Context { |
no outgoing calls
no test coverage detected