Versions in this module Expand all Collapse all v0 v0.1.0 Oct 3, 2026 Changes in this version + const DefaultAddr + const DefaultBlockProfileRate + const DefaultMaxConcurrent + const DefaultMaxProfileDuration + const DefaultMutexProfileFraction + const PathPrefix + var ErrFlightRecorderDisabled = errors.New("easypprof: flight recorder is not enabled") + var ErrFlightRecorderStopped = errors.New("easypprof: flight recorder is not running") + var ErrFlightRecorderUnsupported = errors.New("easypprof: flight recorder requires Go 1.25 or newer") + var ErrNoSnapshotDir = errors.New("easypprof: FlightRecorderConfig.Dir is not set") + var ErrSnapshotThrottled = errors.New("easypprof: snapshot throttled") + func Do(ctx context.Context, fn func(context.Context), labels ...string) + func Label(name string, h http.Handler) http.Handler + type Config struct + Addr string + AllowUnauthenticated bool + AllowedCIDRs []string + Authorizer func(r *http.Request) (subject string, ok bool) + BlockProfileRate int + DisableFullGoroutineDump bool + EnableCmdline bool + FlightRecorder *FlightRecorderConfig + Logger *slog.Logger + MaxConcurrent int + MaxProfileDuration time.Duration + MutexProfileFraction int + Tokens map[string]string + type FlightRecorderConfig struct + Dir string + MaxBytes uint64 + MinAge time.Duration + MinInterval time.Duration + type Server struct + func New(cfg Config) (*Server, error) + func (s *Server) Addr() string + func (s *Server) Disable() + func (s *Server) Enable() error + func (s *Server) Enabled() bool + func (s *Server) Handler() (http.Handler, error) + func (s *Server) Mount(mux *http.ServeMux) error + func (s *Server) Shutdown(ctx context.Context) error + func (s *Server) Snapshot(reason string) (string, error) + func (s *Server) SnapshotTo(w io.Writer) (int64, error) + func (s *Server) Start() error