pprofutils

package
v0.1.32 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyPressReader

type KeyPressReader interface {
	WaitForKeyPress() byte
}

type PprofUtils

type PprofUtils struct {
	Log         logger.LoggerInterface
	ErrCh       chan error // shared error channel
	Server      Server
	SecretToken string
	PprofPort   string
	BaseURL     string
	EnablePprof bool
	// contains filtered or unexported fields
}

func NewPprofUtils

func NewPprofUtils(enablePprof bool, pprofPort string, secretToken string, baseURL string, log logger.LoggerInterface, errCh chan error) *PprofUtils

func (*PprofUtils) DumpDebugPProf

func (p *PprofUtils) DumpDebugPProf() error

func (*PprofUtils) GetErrorChannel

func (p *PprofUtils) GetErrorChannel() chan error

func (*PprofUtils) SetLogger

func (p *PprofUtils) SetLogger(log logger.LoggerInterface)

func (*PprofUtils) StartPprof

func (p *PprofUtils) StartPprof(certPath string, keyPath string) chan error

func (*PprofUtils) StartServerWithShutdown

func (p *PprofUtils) StartServerWithShutdown(addr string, certPath string, keyPath string, reader KeyPressReader) chan error

type RealKeyPressReader

type RealKeyPressReader struct{}

func (*RealKeyPressReader) WaitForKeyPress

func (r *RealKeyPressReader) WaitForKeyPress() byte

type Server

type Server interface {
	ListenAndServeTLS(certFile, keyFile string) error
	Shutdown(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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