debugserver

package module
v0.60.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: Apache-2.0 Imports: 11 Imported by: 163

README

debugserver

Go Report Card Go Reference

A helper function for running a pre-configured pprof server in go.

[!NOTE]

This repository should be imported as code.cloudfoundry.org/debugserver.

Docs

Contributing

See the Contributing.md for more information on how to contribute.

Working Group Charter

This repository is maintained by App Runtime Platform under Diego area.

[!IMPORTANT]

Content in this file is managed by the CI task sync-readme and is generated by CI following a convention.

Documentation

Index

Constants

View Source
const (
	DebugFlag = "debugAddr"
)

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(flags *flag.FlagSet)

func DebugAddress

func DebugAddress(flags *flag.FlagSet) string

func Handler

func Handler(zapCtrl zapLogLevelController) http.Handler

func Run

func Run(address string, zapCtrl zapLogLevelController) (ifrit.Process, error)

Run starts the debug server with the provided address and log controller. Run() -> runProcess() -> Runner() -> http_server.New() -> Handler()

func Runner

func Runner(address string, zapCtrl zapLogLevelController) ifrit.Runner

Runner creates an ifrit.Runner for the debug server with the provided address and log controller.

func ValidateAndNormalize added in v0.55.0

func ValidateAndNormalize(w http.ResponseWriter, r *http.Request, level []byte) (string, error)

Exported only for tests

Types

type DebugServerConfig

type DebugServerConfig struct {
	DebugAddress string `json:"debug_address"`
}

type LagerAdapter added in v0.55.0

type LagerAdapter struct {
	Sink ReconfigurableSinkInterface
}

LagerAdapter is an adapter for the ReconfigurableSinkInterface to work with lager.LogLevel.

func (*LagerAdapter) SetMinLevel added in v0.55.0

func (l *LagerAdapter) SetMinLevel(level lager.LogLevel)

SetMinLevel sets the minimum log level for the LagerAdapter.

type ReconfigurableSinkInterface added in v0.20.0

type ReconfigurableSinkInterface interface {
	SetMinLevel(level lager.LogLevel)
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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