kubernetes/staging/src/k8s.io/apiserver/pkg/server/filters/timeout.go

// WithTimeoutForNonLongRunningRequests times out non-long-running requests after the time given by timeout.
func WithTimeoutForNonLongRunningRequests(handler http.Handler, longRunning apirequest.LongRunningRequestCheck) http.Handler {}

type timeoutFunc

// WithTimeout returns an http.Handler that runs h with a timeout
// determined by timeoutFunc. The new http.Handler calls h.ServeHTTP to handle
// each request, but if a call runs for longer than its time limit, the
// handler responds with a 504 Gateway Timeout error and the message
// provided. (If msg is empty, a suitable default message will be sent.) After
// the handler times out, writes by h to its http.ResponseWriter will return
// http.ErrHandlerTimeout. If timeoutFunc returns a nil timeout channel, no
// timeout will be enforced. recordFn is a function that will be invoked whenever
// a timeout happens.
func WithTimeout(h http.Handler, timeoutFunc timeoutFunc) http.Handler {}

type timeoutHandler

func (t *timeoutHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {}

type timeoutWriter

func newTimeoutWriter(w http.ResponseWriter) (timeoutWriter, http.ResponseWriter) {}

var _

var _

type baseTimeoutWriter

func (tw *baseTimeoutWriter) Unwrap() http.ResponseWriter {}

func (tw *baseTimeoutWriter) Header() http.Header {}

func (tw *baseTimeoutWriter) Write(p []byte) (int, error) {}

func (tw *baseTimeoutWriter) Flush() {}

func (tw *baseTimeoutWriter) WriteHeader(code int) {}

func copyHeaders(dst, src http.Header) {}

func (tw *baseTimeoutWriter) timeout(err *apierrors.StatusError) {}

func (tw *baseTimeoutWriter) CloseNotify() <-chan bool {}

func (tw *baseTimeoutWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) {}