pprof

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPprofDisabled = PprofDisabledError{}

Functions

This section is empty.

Types

type Config added in v1.7.0

type Config struct {
	// Enabled controls whether the pprof service is enabled.
	Enabled bool `json:"enabled"`

	// ListenNetwork is the network to listen on.
	ListenNetwork string `json:"listenNetwork,omitzero"`

	// ListenAddress is the address to listen on.
	ListenAddress string `json:"listenAddress"`
}

Config is the configuration for the pprof service.

func (*Config) NewService added in v1.7.0

func (c *Config) NewService(logger *tslog.Logger) (*Service, error)

NewService creates a new pprof service.

type PprofDisabledError added in v1.9.0

type PprofDisabledError struct{}

PprofDisabledError is returned when the pprof service is disabled at build time.

func (PprofDisabledError) Error added in v1.9.0

func (PprofDisabledError) Error() string

type Service

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

Service implements [service.Service].

func (*Service) SlogAttr added in v1.8.0

func (*Service) SlogAttr() slog.Attr

SlogAttr implements [service.Service.SlogAttr].

func (*Service) Start

func (s *Service) Start(ctx context.Context) error

Start implements [service.Service.Start].

func (*Service) Stop

func (s *Service) Stop() error

Stop implements [service.Service.Stop].

Jump to

Keyboard shortcuts

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