Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultAddress is the default address the application will bind to DefaultAddress = "0.0.0.0" // DefaultPort is the default port the application will listen on DefaultPort = 8080 // DefaultReadBufferSize is the default value for ReadBufferSize DefaultReadBufferSize = 8192 // MinimumReadBufferSize is the minimum value for ReadBufferSize, and also the default value set // for fiber.Config.ReadBufferSize MinimumReadBufferSize = 4096 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Address to listen on (defaults to 0.0.0.0 specified by DefaultAddress) Address string `yaml:"address"` // Port to listen on (default to 8080 specified by DefaultPort) Port int `yaml:"port"` // ReadBufferSize sets fiber.Config.ReadBufferSize, which is the buffer size for reading requests coming from a // single connection and also acts as a limit for the maximum header size. // // If you're getting occasional "Request Header Fields Too Large", you may want to try increasing this value. // // Defaults to DefaultReadBufferSize ReadBufferSize int `yaml:"read-buffer-size,omitempty"` // TLS configuration (optional) TLS *TLSConfig `yaml:"tls,omitempty"` }
Config is the structure which supports the configuration of the server listening to requests
func GetDefaultConfig ¶
func GetDefaultConfig() *Config
GetDefaultConfig returns a Config struct with the default values
func (*Config) SocketAddress ¶
SocketAddress returns the combination of the Address and the Port
func (*Config) ValidateAndSetDefaults ¶
ValidateAndSetDefaults validates the web configuration and sets the default values if necessary.
Click to show internal directories.
Click to hide internal directories.