observ

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Middleware

func Middleware(log *zap.Logger) func(next http.Handler) http.Handler

func ReadUserIP

func ReadUserIP(r *http.Request) string

Types

type ReadCounter

type ReadCounter struct {
	io.ReadCloser

	Size int
}

func (*ReadCounter) Read

func (r *ReadCounter) Read(b []byte) (int, error)

type WriterInterceptor

type WriterInterceptor struct {
	http.ResponseWriter

	Size int
	// contains filtered or unexported fields
}

func (*WriterInterceptor) Code

func (w *WriterInterceptor) Code() int

func (*WriterInterceptor) Write

func (w *WriterInterceptor) Write(b []byte) (int, error)

func (*WriterInterceptor) WriteHeader

func (w *WriterInterceptor) WriteHeader(code int)

Jump to

Keyboard shortcuts

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