runtime

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultTimings = HTTPTimings{
	IdleTimeout:       time.Second * 60,
	ReadHeaderTimeout: time.Second * 10,
}

Functions

func GetHostPort

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

func NewBackend added in v1.9.0

func NewBackend(ctx *hcl.EvalContext, body *hclsyntax.Body, log *logrus.Entry,
	conf *config.Couper, store *cache.MemoryStore) (http.RoundTripper, error)

func NewEndpointOptions added in v1.11.0

func NewEndpointOptions(confCtx *hcl.EvalContext, endpointConf *config.Endpoint, apiConf *config.API,
	serverOptions *server.Options, log *logrus.Entry, conf *config.Couper, memStore *cache.MemoryStore) (*handler.EndpointOptions, error)

Types

type ACDefinitions

type ACDefinitions map[string]*AccessControl

func (ACDefinitions) Add

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