debugserver

package
v0.0.0-...-75b7e41 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Services []Service

Services is the list of registered services' debug addresses. Populated from SRC_PROF_MAP.

Functions

func Start

func Start(extra ...Endpoint)

Start runs a debug server (pprof, prometheus, etc) if it is configured (via SRC_PROF_HTTP environment variable). It is blocking.

Types

type Endpoint

type Endpoint struct {
	// Name is the name shown on the index page for the endpoint
	Name string
	// Path is passed to http.Mux.Handle as the pattern.
	Path string
	// Handler is the debug handler
	Handler http.Handler
}

Endpoint is a handler for the debug server. It will be displayed on the debug index page.

type Service

type Service struct {
	// Name of the service. Always the binary name. example: "gitserver"
	Name string

	// Host is the host:port for the services SRC_PROF_HTTP. example:
	// "127.0.0.1:6060"
	Host string
}

Service is a service's debug addr (host:port).

Jump to

Keyboard shortcuts

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