SetSendCompress sets the compression algorithm to the stream.
(name string)
| 110 | |
| 111 | // SetSendCompress sets the compression algorithm to the stream. |
| 112 | func (s *ServerStream) SetSendCompress(name string) error { |
| 113 | if s.isHeaderSent() || s.getState() == streamDone { |
| 114 | return errors.New("transport: set send compressor called after headers sent or stream done") |
| 115 | } |
| 116 | |
| 117 | s.sendCompress = name |
| 118 | return nil |
| 119 | } |
| 120 | |
| 121 | // SetContext sets the context of the stream. This will be deleted once the |
| 122 | // stats handler callouts all move to gRPC layer. |