fiberbuilder

package
v2.0.0-beta.6 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Prefork                   bool               `yaml:"-"`
	ServerHeader              string             `yaml:"-"`
	CaseSensitive             bool               `yaml:"-"`
	Immutable                 bool               `yaml:"-"`
	UnescapePath              bool               `yaml:"-"`
	ProxyHeader               string             `yaml:"-"`
	GETOnly                   bool               `yaml:"-"`
	DisableKeepalive          bool               `yaml:"-"`
	DisableDefaultDate        bool               `yaml:"-"`
	DisableDefaultContentType bool               `yaml:"-"`
	ErrorHandler              fiber.ErrorHandler `yaml:"-" json:"-"`
	BodyLimit                 int                `yaml:"-"`
	Concurrency               int                `yaml:"-"`

	// StreamRequestBody enables request body streaming,
	// and calls the handler sooner when given body is
	// larger then the current limit.
	StreamRequestBody bool `yaml:"stream_request_body"`

	// Will not pre parse Multipart Form data if set to true.
	//
	// This option is useful for servers that desire to treat
	// multipart form data as a binary blob, or choose when to parse the data.
	//
	// Server pre parses multipart form data by default.
	DisablePreParseMultipartForm bool `yaml:"disable_pre_parse_multipart_form"`

	// Aggressively reduces memory usage at the cost of higher CPU usage
	// if set to true.
	//
	// Try enabling this option only if the server consumes too much memory
	// serving mostly idle keep-alive connections. This may reduce memory
	// usage by more than 50%.
	//
	// Default: false
	ReduceMemoryUsage bool `yaml:"reduce_memory_usage"`

	// If set to true, c.IP() and c.IPs() will validate IP addresses before returning them.
	// Also, c.IP() will return only the first valid IP rather than just the raw header
	// WARNING: this has a performance cost associated with it.
	//
	// Default: false
	EnableIPValidation bool `yaml:"enable_ip_validation"`

	// If set to true, will print all routes with their method, path and handler.
	// Default: false
	EnablePrintRoutes bool `yaml:"enable_print_routes"`

	// EnableSplittingOnParsers splits the query/body/header parameters by comma when it's true.
	// For example, you can use it to parse multiple values from a query parameter like this:
	//   /api?foo=bar,baz == foo[]=bar&foo[]=baz
	//
	// Optional. Default: false
	EnableSplittingOnParsers bool `yaml:"enable_splitting_on_parsers"`

	ETag                     bool          `yaml:"etag"`
	ReadTimeout              time.Duration `yaml:"read_timeout"`
	WriteTimeout             time.Duration `yaml:"write_timeout"`
	IdleTimeout              time.Duration `yaml:"idle_timeout"`
	ReadBufferSize           int           `yaml:"read_buffer_size"`
	WriteBufferSize          int           `yaml:"write_buffer_size"`
	CompressedFileSuffix     string        `yaml:"compressed_file_suffix"`
	DisableHeaderNormalizing bool          `yaml:"disable_header_normalizing"`
	DisableStartupMessage    bool          `yaml:"disable_startup_message"`
}

func (*Config) Build

func (t *Config) Build() (r result.Result[fiber.Config])

func (*Config) ToCfg

func (t *Config) ToCfg() fiber.Config

Jump to

Keyboard shortcuts

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