MCPcopy
hub / github.com/connectrpc/connect-go / SetTimeout

Method SetTimeout

protocol.go:104–104  ·  view source on GitHub ↗

SetTimeout runs before NewStream. Implementations may inspect the HTTP request, parse any timeout set by the client, and return a modified context and cancellation function. If the client didn't send a timeout, SetTimeout should return the request's context, a nil cancellation function, and a nil e

(*http.Request)

Source from the content-addressed store, hash-verified

102 // If the client didn't send a timeout, SetTimeout should return the
103 // request's context, a nil cancellation function, and a nil error.
104 SetTimeout(*http.Request) (context.Context, context.CancelFunc, error)
105
106 // CanHandlePayload returns true if the protocol can handle an HTTP request.
107 // This is called after the request method is validated, so we only need to

Callers 1

ServeHTTPMethod · 0.95

Implementers 2

grpcHandlerprotocol_grpc.go
connectHandlerprotocol_connect.go

Calls

no outgoing calls

Tested by

no test coverage detected