MCPcopy
hub / github.com/grafana/dskit / FromHeader

Function FromHeader

httpgrpc/httpgrpc.go:98–107  ·  view source on GitHub ↗
(hs http.Header)

Source from the content-addressed store, hash-verified

96}
97
98func FromHeader(hs http.Header) []*Header {
99 result := make([]*Header, 0, len(hs))
100 for k, vs := range hs {
101 result = append(result, &Header{
102 Key: k,
103 Values: vs,
104 })
105 }
106 return result
107}
108
109// Error returns a HTTP gRPC error that is correctly forwarded over
110// gRPC, and can eventually be converted back to a HTTP response with

Callers 2

HandleMethod · 0.92
FromHTTPRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected