runtime

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2022 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultBackendConf = &config.Backend{
	ConnectTimeout: "10s",
	TTFBTimeout:    "60s",
	Timeout:        "300s",
}
View Source
var DefaultTimings = HTTPTimings{
	IdleTimeout:       time.Second * 60,
	ReadHeaderTimeout: time.Second * 10,
}

Functions

func GetHostPort

func GetHostPort(hostPort string) (string, int, error)

Types

type ACDefinitions

type ACDefinitions map[string]*AccessControl

func (ACDefinitions) Add

func (ACDefinitions) MustExist

func (m ACDefinitions) MustExist(name string) error

type AccessControl

type AccessControl struct {
	Control      accesscontrol.AccessControl
	ErrorHandler []*config.ErrorHandler
}

type HTTPTimings

type HTTPTimings struct {
	IdleTimeout       time.Duration `env:"timing_idle_timeout"`
	ReadHeaderTimeout time.Duration `env:"timing_read_header_timeout"`
	// ShutdownDelay determines the time between marking the http server
	// as unhealthy and calling the final shutdown method which denies accepting new requests.
	ShutdownDelay time.Duration `env:"timing_shutdown_delay"`
	// ShutdownTimeout is the context duration for shutting down the http server. Running requests
	// gets answered and those which exceeded this timeout getting lost. In combination with
	// ShutdownDelay the load-balancer should have picked another instance already.
	ShutdownTimeout time.Duration `env:"timing_shutdown_timeout"`
}

type HandlerKind

type HandlerKind uint8

func (HandlerKind) String

func (i HandlerKind) String() string

type Hosts

type Hosts map[string]*MuxOptions

type MuxOptions

type MuxOptions struct {
	EndpointRoutes map[string]http.Handler
	FileRoutes     map[string]http.Handler
	SPARoutes      map[string]http.Handler
	ServerOptions  *server.Options
}

func NewMuxOptions

func NewMuxOptions() *MuxOptions

type Port

type Port int

func (Port) String

func (p Port) String() string

type Ports

type Ports map[Port]Hosts

type ServerConfiguration

type ServerConfiguration Ports

func NewServerConfiguration

func NewServerConfiguration(conf *config.Couper, log *logrus.Entry, memStore *cache.MemoryStore) (ServerConfiguration, error)

NewServerConfiguration sets http handler specific defaults and validates the given gateway configuration. Wire up all endpoints and maps them within the returned Server.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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