oppprof

package
v1.7.4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 20 Imported by: 8

Documentation

Index

Constants

View Source
const (
	EnabledFlagName     = "pprof.enabled"
	ListenAddrFlagName  = "pprof.addr"
	PortFlagName        = "pprof.port"
	ProfileTypeFlagName = "pprof.type"
	ProfilePathFlagName = "pprof.path"
)

Variables

This section is empty.

Functions

func CLIFlags

func CLIFlags(envPrefix string) []cli.Flag

func CLIFlagsWithCategory added in v1.7.0

func CLIFlagsWithCategory(envPrefix string, category string) []cli.Flag

Types

type CLIConfig

type CLIConfig struct {
	ListenEnabled bool
	ListenAddr    string
	ListenPort    int

	ProfileType     profileType
	ProfileDir      string
	ProfileFilename string
}

func DefaultCLIConfig

func DefaultCLIConfig() CLIConfig

func ReadCLIConfig

func ReadCLIConfig(ctx *cli.Context) CLIConfig

func (CLIConfig) Check

func (m CLIConfig) Check() error

type Service

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

func New

func New(listenEnabled bool, listenAddr string, listenPort int, profType profileType, profileDir, profileFilename string) *Service

func (*Service) Start

func (s *Service) Start() error

func (*Service) Stop

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

Jump to

Keyboard shortcuts

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