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

Method encodeHeaderField

test/rawConnWrapper.go:111–117  ·  view source on GitHub ↗
(k, v string)

Source from the content-addressed store, hash-verified

109}
110
111func (rcw *rawConnWrapper) encodeHeaderField(k, v string) error {
112 err := rcw.hpackEnc.WriteField(hpack.HeaderField{Name: k, Value: v})
113 if err != nil {
114 return fmt.Errorf("HPACK encoding error for %q/%q: %v", k, v, err)
115 }
116 return nil
117}
118
119// encodeRawHeader is for usage on both client and server side to construct header based on the input
120// key, value pairs.

Callers 2

encodeRawHeaderMethod · 0.95
encodeHeaderMethod · 0.95

Calls 1

ErrorfMethod · 0.65

Tested by

no test coverage detected