kubernetes/vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go

type HeaderFunc

type WriteHeaderFunc

type WriteFunc

type FlushFunc

type CloseNotifyFunc

type HijackFunc

type ReadFromFunc

type PushFunc

type Hooks

// Wrap returns a wrapped version of w that provides the exact same interface
// as w. Specifically if w implements any combination of:
//
// - http.Flusher
// - http.CloseNotifier
// - http.Hijacker
// - io.ReaderFrom
// - http.Pusher
//
// The wrapped version will implement the exact same combination. If no hooks
// are set, the wrapped version also behaves exactly as w. Hooks targeting
// methods not supported by w are ignored. Any other hooks will intercept the
// method they target and may modify the call's arguments and/or return values.
// The CaptureMetrics implementation serves as a working example for how the
// hooks can be used.
func Wrap(w http.ResponseWriter, hooks Hooks) http.ResponseWriter {}

type rw

func (w *rw) Unwrap() http.ResponseWriter {}

func (w *rw) Header() http.Header {}

func (w *rw) WriteHeader(code int) {}

func (w *rw) Write(b []byte) (int, error) {}

func (w *rw) Flush() {}

func (w *rw) CloseNotify() <-chan bool {}

func (w *rw) Hijack() (net.Conn, *bufio.ReadWriter, error) {}

func (w *rw) ReadFrom(src io.Reader) (int64, error) {}

func (w *rw) Push(target string, opts *http.PushOptions) error {}

type Unwrapper

// Unwrap returns the underlying http.ResponseWriter from within zero or more
// layers of httpsnoop wrappers.
func Unwrap(w http.ResponseWriter) http.ResponseWriter {}