profilerservice

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// Enabled is a flag to enable the profiler.
	Enabled bool `yaml:"enabled,omitempty"`

	// Port is the port on which the profiler server listens.
	Port int `yaml:"port,omitempty"`
}

Options represents the options for enabling pprof profiler.

type Service

type Service struct {
	Options *Options
}

Service is the profiler service.

func (*Service) Name

func (s *Service) Name() string

Name returns the name of the profiler service.

func (*Service) Run

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

Run starts the profiler server that exposes an endpoint to collect profiler from. It handles shutdown based on the context, and returns an error if the server fails to start.

Jump to

Keyboard shortcuts

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