config

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2022 License: MIT Imports: 10 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 {
	Http Http `yaml:"http"`
	Grpc Grpc `yaml:"grpc"`
}

Config allows configuring HTTP Server

func Default

func Default() *Config

Default resets all fields to the default configuration.

func FromFile

func FromFile(path string) (*Config, error)

FromFile loads the application configuration from the file system.

type EnforcementPolicy added in v1.0.5

type EnforcementPolicy struct {
	MinTime             time.Duration `yaml:"minTime"`
	PermitWithoutStream bool          `yaml:"permitWithoutStream"`
}

func (EnforcementPolicy) Object added in v1.0.5

type Grpc added in v1.0.5

type Grpc struct {
	Network     string                   `yaml:"network"`
	Address     string                   `yaml:"address"`
	Certificate *certificate.Certificate `yaml:"certificate"`
	KeepAlive   KeepAlive                `yaml:"keepAlive"`
}

type Http added in v1.0.5

type Http struct {
	Ports          Ports                    `yaml:"ports"`
	Timeout        Timeout                  `yaml:"timeout"`
	Connection     *tcp.Connection          `yaml:"connection"`
	Certificate    *certificate.Certificate `yaml:"certificate"`
	MaxHeaderBytes int                      `yaml:"maxHeaderBytes"`
}

type KeepAlive added in v1.0.5

type KeepAlive struct {
	EnforcementPolicy EnforcementPolicy `yaml:"enforcementPolicy"`
	ServerParameters  ServerParameters  `yaml:"serverParameters"`
}

type Ports

type Ports struct {
	HTTP  int `yaml:"http"`
	HTTPS int `yaml:"https"`
}

Ports allows to configure the ports that Airborne will listen on.

type ServerParameters added in v1.0.5

type ServerParameters struct {
	MaxConnectionIdle      time.Duration `yaml:"maxConnectionIdle"`
	MaxConnectionAge       time.Duration `yaml:"maxConnectionAge"`
	MaxConnectionAgreGrace time.Duration `yaml:"maxConnectionAgreGrace"`
	Time                   time.Duration `yaml:"time"`
	Timeout                time.Duration `yaml:"timeout"`
	Shutdown               time.Duration `yaml:"shutdown"`
}

func (ServerParameters) Object added in v1.0.5

type Timeout

type Timeout struct {
	Idle       time.Duration `yaml:"idle"`
	ReadHeader time.Duration `yaml:"readHeader"`
	Read       time.Duration `yaml:"read"`
	Write      time.Duration `yaml:"write"`
	Shutdown   time.Duration `yaml:"shutdown"`
}

Timeout allows to configure different timeout durations.

Jump to

Keyboard shortcuts

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