NewContextWithRequestInfo creates a new context from ctx and attaches ri to it. This RequestInfo will be accessible via RequestInfoFromContext. Intended to be used from tests for PerRPCCredentials implementations (that often need to check connection's SecurityLevel). Should not be used from non-te
(ctx context.Context, ri RequestInfo)
| 258 | // |
| 259 | // This API is experimental. |
| 260 | func NewContextWithRequestInfo(ctx context.Context, ri RequestInfo) context.Context { |
| 261 | return context.WithValue(ctx, requestInfoKey{}, ri) |
| 262 | } |
| 263 | |
| 264 | // ClientHandshakeInfo holds data to be passed to ClientHandshake. This makes |
| 265 | // it possible to pass arbitrary data to the handshaker from gRPC, resolver, |