debug

package module
v0.0.0-...-cb1d522 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

README

debug

Test status Go Report Card GoDev

Debug plugin.

  • Expvar HTTP endpoint.
  • Pprof HTTP endpoint.

Install

go get github.com/atreugo/debug

Contributing

Feel free to contribute... 😉

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(s *atreugo.Atreugo, cfg Config)

Register registers the debug plugin to the server with the given configuration.

Types

type Config

type Config struct {
	Expvar ExpvarConfig
	Pprof  PprofConfig
}

Config is the configuration for the Debug plugin.

type ExpvarConfig

type ExpvarConfig struct {
	// Method is the HTTP method to use for the metrics endpoint.
	//
	// Default: "GET"
	Method string

	// URL is the HTTP URL to scrape for expvar metrics.
	//
	// Default: "/debug/vars"
	URL string
}

ExpvarConfig is the expvar configuration.

type PprofConfig

type PprofConfig struct {
	// Method is the HTTP method to use for the metrics endpoint.
	//
	// Default: "GET"
	Method string

	// URL is the HTTP URL to scrape for pprof metrics.
	//
	// Default: "/debug/pprof/{profile:*}"
	URL string
}

PprofConfig is the pprof configuration.

Jump to

Keyboard shortcuts

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