Documentation ¶
Index ¶
- Variables
- func GetHostPort(hostPort string) (string, int, error)
- func NewBackend(ctx *hcl.EvalContext, body *hclsyntax.Body, log *logrus.Entry, ...) (http.RoundTripper, error)
- func NewEndpointOptions(confCtx *hcl.EvalContext, endpointConf *config.Endpoint, apiConf *config.API, ...) (*handler.EndpointOptions, error)
- type ACDefinitions
- type AccessControl
- type HTTPTimings
- type HandlerKind
- type Hosts
- type MuxOptions
- type Port
- type Ports
- type ServerConfiguration
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultTimings = HTTPTimings{ IdleTimeout: time.Second * 60, ReadHeaderTimeout: time.Second * 10, }
Functions ¶
func NewBackend ¶
Types ¶
type ACDefinitions ¶
type ACDefinitions map[string]*AccessControl
func (ACDefinitions) Add ¶
func (m ACDefinitions) Add(name string, ac accesscontrol.AccessControl, eh []*config.ErrorHandler)
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 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.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.