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

Function handleForwardResponseOptions

runtime/handler.go:217–227  ·  view source on GitHub ↗
(ctx context.Context, w http.ResponseWriter, resp proto.Message, opts []func(context.Context, http.ResponseWriter, proto.Message) error)

Source from the content-addressed store, hash-verified

215}
216
217func handleForwardResponseOptions(ctx context.Context, w http.ResponseWriter, resp proto.Message, opts []func(context.Context, http.ResponseWriter, proto.Message) error) error {
218 if len(opts) == 0 {
219 return nil
220 }
221 for _, opt := range opts {
222 if err := opt(ctx, w, resp); err != nil {
223 return fmt.Errorf("error handling ForwardResponseOptions: %w", err)
224 }
225 }
226 return nil
227}
228
229func handleForwardResponseStreamError(ctx context.Context, wroteHeader bool, marshaler Marshaler, w http.ResponseWriter, req *http.Request, mux *ServeMux, err error, delimiter []byte) {
230 st := mux.streamErrorHandler(ctx, err)

Callers 2

ForwardResponseStreamFunction · 0.85
ForwardResponseMessageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected