MCPcopy
hub / github.com/grpc/grpc-go / waitOnHeader

Method waitOnHeader

internal/transport/client_stream.go:129–140  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

127}
128
129func (s *ClientStream) waitOnHeader() {
130 select {
131 case <-s.ctx.Done():
132 // Close the stream to prevent headers/trailers from changing after
133 // this function returns.
134 s.Close(ContextErr(s.ctx.Err()))
135 // headerChan could possibly not be closed yet if closeStream raced
136 // with operateHeaders; wait until it is closed explicitly here.
137 <-s.headerChan
138 case <-s.headerChan:
139 }
140}
141
142// RecvCompress returns the compression algorithm applied to the inbound
143// message. It is empty string if there is no compression applied.

Callers 3

RecvCompressMethod · 0.95
HeaderMethod · 0.95
TrailersOnlyMethod · 0.95

Implementers 3

clientStreamstream.go
okStreaminternal/xds/httpfilter/fault/fault.go

Calls 4

CloseMethod · 0.95
ContextErrFunction · 0.85
ErrMethod · 0.80
DoneMethod · 0.45

Tested by

no test coverage detected