Middleware

middleware/pprof

github.com/gofiber/fiber/v3/middleware/pprof

import "github.com/gofiber/fiber/v3/middleware/pprof"

Variables

Source: middleware/pprof/config.go:22

var ConfigDefault = Config{
	Next:   nil,
	Prefix: "",
}

Functions

func New(config ...Config) fiber.Handler

Source: middleware/pprof/pprof.go:24

New creates a new middleware handler

Types

type Config

Source: middleware/pprof/config.go:8

Config defines the config for middleware.

type Config struct {
	// Next defines a function to skip this middleware when returned true.
	//
	// Optional. Default: nil
	Next func(c fiber.Ctx) bool

	// Prefix defines a URL prefix added before "/debug/pprof".
	// Note that it should start with (but not end with) a slash.
	// Example: "/federated-fiber"
	//
	// Optional. Default: ""
	Prefix string
}
Fields
  • Next func(c fiber.Ctx) bool

    Next defines a function to skip this middleware when returned true.

    Optional. Default: nil

  • Prefix string

    Prefix defines a URL prefix added before "/debug/pprof". Note that it should start with (but not end with) a slash. Example: "/federated-fiber"

    Optional. Default: ""