internal/appconfig
import "github.com/gofiber/fiber/v3/internal/appconfig"
Package appconfig hands request hot paths the few Config bits they read on every call, without the copy App.Config returns by value.
Config is over 600 bytes, so reading one boolean out of it cost 25ns against 2ns for the App call itself. Package fiber installs a reader that takes the bits off the app directly; it cannot be done from here, because config is unexported and importing fiber would be a cycle.
Functions
func Of(app any) Hot
Source: internal/appconfig/appconfig.go:44
Of returns the Hot bits of app, which must be a *fiber.App.
func SetReader(fn func(any) Hot)
Source: internal/appconfig/appconfig.go:36
SetReader installs the function Of answers with. The first call wins, later calls and a nil reader are ignored.
Package fiber calls this from its init. Nothing else should call it.
Types
type Hot
Source: internal/appconfig/appconfig.go:15
Hot is the subset of fiber.Config that request hot paths read.
type Hot struct {
Immutable bool
DisableHeaderNormalizing bool
UnescapePath bool
}Fields
Immutable boolDisableHeaderNormalizing boolUnescapePath bool