NewContextWithServerTransportStream creates a new context from ctx and attaches stream to it. # Experimental Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.
(ctx context.Context, stream ServerTransportStream)
| 1901 | // Notice: This API is EXPERIMENTAL and may be changed or removed in a |
| 1902 | // later release. |
| 1903 | func NewContextWithServerTransportStream(ctx context.Context, stream ServerTransportStream) context.Context { |
| 1904 | return context.WithValue(ctx, streamKey{}, stream) |
| 1905 | } |
| 1906 | |
| 1907 | // ServerTransportStream is a minimal interface that a transport stream must |
| 1908 | // implement. This can be used to mock an actual transport stream for tests of |