WithForwardResponseRewriter returns a ServeMuxOption that allows for implementers to insert logic that can rewrite the final response before it is forwarded. The response rewriter function is called during unary message forwarding, stream message forwarding and when errors are being forwarded. NOT
(fwdResponseRewriter ForwardResponseRewriter)
| 93 | // NOTE: Using this option will likely make what is generated by `protoc-gen-openapiv2` incorrect. |
| 94 | // Since this option involves making runtime changes to the response shape or type. |
| 95 | func WithForwardResponseRewriter(fwdResponseRewriter ForwardResponseRewriter) ServeMuxOption { |
| 96 | return func(sm *ServeMux) { |
| 97 | sm.forwardResponseRewriter = fwdResponseRewriter |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | // WithForwardResponseOption returns a ServeMuxOption representing the forwardResponseOption. |
| 102 | // |
no outgoing calls