ClientAdvertisedCompressors returns the compressor names advertised by the client via grpc-accept-encoding header.
()
| 127 | // ClientAdvertisedCompressors returns the compressor names advertised by the |
| 128 | // client via grpc-accept-encoding header. |
| 129 | func (s *ServerStream) ClientAdvertisedCompressors() []string { |
| 130 | values := strings.Split(s.clientAdvertisedCompressors, ",") |
| 131 | for i, v := range values { |
| 132 | values[i] = strings.TrimSpace(v) |
| 133 | } |
| 134 | return values |
| 135 | } |
| 136 | |
| 137 | // Header returns the header metadata of the stream. It returns the out header |
| 138 | // after t.WriteHeader is called. It does not block and must not be called |