writer

package
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResponseWriter

type ResponseWriter struct {
	http.ResponseWriter
	// contains filtered or unexported fields
}

ResponseWriter is size counter for http.ResponseWriter

func NewResponseWriter

func NewResponseWriter(rw http.ResponseWriter) *ResponseWriter

NewResponseWriter creates new ResponseWriter instance

func (*ResponseWriter) Elapsed

func (rw *ResponseWriter) Elapsed() time.Duration

Elapsed returns since started value

func (*ResponseWriter) Size

func (rw *ResponseWriter) Size() int

Size returns repsonse size

func (*ResponseWriter) StatusCode

func (rw *ResponseWriter) StatusCode() int

StatusCode returns sent status code

func (*ResponseWriter) Write

func (rw *ResponseWriter) Write(buf []byte) (int, error)

Write returns underlying Write result, while counting data size

func (*ResponseWriter) WriteHeader

func (rw *ResponseWriter) WriteHeader(statusCode int)

WriteHeader returns underlying WriteHeader

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL