MCPcopy
hub / github.com/grpc-ecosystem/grpc-gateway / WithOutgoingTrailerMatcher

Function WithOutgoingTrailerMatcher

runtime/mux.go:219–223  ·  view source on GitHub ↗

WithOutgoingTrailerMatcher returns a ServeMuxOption representing a headerMatcher for outgoing response from gateway. This matcher will be called with each header in response trailer metadata. If matcher returns true, that header will be passed to http response returned from gateway. To transform th

(fn HeaderMatcherFunc)

Source from the content-addressed store, hash-verified

217// passed to http response returned from gateway. To transform the header before passing to response,
218// matcher should return the modified header.
219func WithOutgoingTrailerMatcher(fn HeaderMatcherFunc) ServeMuxOption {
220 return func(mux *ServeMux) {
221 mux.outgoingTrailerMatcher = fn
222 }
223}
224
225// WithMetadata returns a ServeMuxOption for passing metadata to a gRPC context.
226//

Callers 1

Calls

no outgoing calls

Tested by 1