appconfig

package
v3.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetReader

func SetReader(fn func(any) Hot)

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

type Hot struct {
	Immutable                bool
	DisableHeaderNormalizing bool
	UnescapePath             bool
}

Hot is the subset of fiber.Config that request hot paths read.

func Of

func Of(app any) Hot

Of returns the Hot bits of app, which must be a *fiber.App.

Jump to

Keyboard shortcuts

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