Documentation
¶
Index ¶
Constants ¶
View Source
const ( // EnvEnableProfiling is the environment variable to control profiling EnvEnableProfiling = "ENABLE_PROFILING" // EnvProfilingPort is the environment variable to set profiling port EnvProfilingPort = "PROFILING_PORT" )
Variables ¶
This section is empty.
Functions ¶
func Module ¶
func Module(options ...ProfilerOptions) fx.Option
Module provides the profiler as an fx module
func NewProfilerServer ¶
func NewProfilerServer(options ProfilerOptions) *http.Server
NewProfilerServer creates an HTTP server for profiling
func RegisterProfiler ¶
func RegisterProfiler(lc fx.Lifecycle, options ProfilerOptions)
RegisterProfiler registers the profiler with fx lifecycle
func SetupPprofMux ¶
Types ¶
type ProfilerOptions ¶
func DefaultProfilerOptions ¶
func DefaultProfilerOptions() ProfilerOptions
DefaultProfilerOptions provides default settings for the profiler
func LoadOptionsFromEnv ¶
func LoadOptionsFromEnv() ProfilerOptions
LoadOptionsFromEnv loads profiler options from environment variables
Click to show internal directories.
Click to hide internal directories.