debug

package
v0.0.2-beta.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupPProf

func SetupPProf(route gin.IRouter, prefixOptions ...string)

SetupPProf registers pprof debugging endpoints on the given router. It provides CPU, memory, and other performance profiling endpoints.

Types

type Config

type Config struct {
	HTTP HTTPConfig `json:"http" yaml:"http"`
}

Config contains the complete configuration for the debug web service.

type HTTPConfig

type HTTPConfig struct {
	Address string `json:"address" yaml:"address"`
}

HTTPConfig contains HTTP server configuration for the debug service.

type Web

type Web struct {
	// contains filtered or unexported fields
}

Web provides a debug web server with pprof endpoints for performance profiling.

func NewWebServer

func NewWebServer(config *Config) *Web

NewWebServer creates a new debug web server instance with the given configuration.

func (*Web) Identifier

func (w *Web) Identifier() string

Identifier returns the service identifier for the debug web server.

func (*Web) Start

func (w *Web) Start(ctx context.Context) error

Start begins serving the debug web server with pprof endpoints. It returns nil immediately if no configuration is provided.

func (*Web) Stop

func (w *Web) Stop(ctx context.Context) error

Stop gracefully shuts down the debug web server.

Jump to

Keyboard shortcuts

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