config

package
v2.23.5 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonOptions added in v2.22.0

type CommonOptions struct {
	// RawBody if turned on, RR will not parse the incoming HTTP body and will send it as is
	RawBody bool `mapstructure:"raw_body"`

	// Host and port to handle as http server.
	Address string `mapstructure:"address"`

	// AccessLogs turn on/off, logged at Info log level, default: false
	AccessLogs bool `mapstructure:"access_logs"`

	// List of the middleware names (order will be preserved)
	Middleware []string `mapstructure:"middleware"`

	// Pool configures worker pool.
	Pool *pool.Config `mapstructure:"pool"`

	// InternalErrorCode used to override default 500 (InternalServerError) http code
	InternalErrorCode uint64 `mapstructure:"internal_error_code"`

	// MaxRequestSize specified max size for payload body in megabytes, set 0 to unlimited.
	MaxRequestSize uint64 `mapstructure:"max_request_size"`
}

type Config added in v2.14.2

type Config struct {
	// HTTP related configuration
	CommonOptions *CommonOptions `mapstructure:"http"`

	// SSLConfig defines https server options.
	SSLConfig *https.SSL `mapstructure:"ssl"`

	// FCGIConfig configuration. You can use FastCGI without HTTP server.
	FCGIConfig *fcgi.FCGI `mapstructure:"fcgi"`

	// HTTP2Config configuration
	HTTP2Config *https.HTTP2 `mapstructure:"http2"`

	// Uploads configures uploads configuration.
	Uploads *uploads.Uploads `mapstructure:"uploads"`
}

Config configures RoadRunner HTTP server.

func (*Config) EnableFCGI added in v2.14.2

func (c *Config) EnableFCGI() bool

EnableFCGI is true when FastCGI server must be enabled.

func (*Config) EnableHTTP added in v2.14.2

func (c *Config) EnableHTTP() bool

EnableHTTP is true when http server must run.

func (*Config) EnableTLS added in v2.14.2

func (c *Config) EnableTLS() bool

EnableTLS returns true if pool must listen TLS connections.

func (*Config) InitDefaults added in v2.14.2

func (c *Config) InitDefaults() error

InitDefaults must populate HTTP values using given HTTP source. Must return error if HTTP is not valid.

func (*Config) Valid added in v2.14.2

func (c *Config) Valid() error

Valid validates the configuration.

Jump to

Keyboard shortcuts

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