httpdebug

package
v3.3.5 Latest Latest
Warning

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

Go to latest
Published: May 29, 2020 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = &Config{
	Logger:       log.DefaultLogger.CreateChild(),
	ReadTimeout:  pointer.Duration(time.Duration(0)),
	WriteTimeout: pointer.Duration(time.Duration(0)),
}

DefaultConfig is used by default for unset config parameters

View Source
var (
	// LogKeyHTTPClass is appended as a key to subloggers of the debug server
	LogKeyHTTPClass = log.Key("http_class")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Logger        log.Logger
	ReadTimeout   *time.Duration
	WriteTimeout  *time.Duration
	ExplorableObj interface{}
}

Config controls optional parameters for the debug server

type Server

type Server struct {
	http.Server
	Exp2 *expvar2.Handler
	Mux  *http.ServeMux
}

Server exposes private debugging information

func New

func New(conf *Config) *Server

New creates a new debug server

Jump to

Keyboard shortcuts

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