router

package
v1.13.4 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 46 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ReadHeaderTimeout is the time a client has to send the request headers.
	ReadHeaderTimeout = 10 * time.Second
	// IdleTimeout is the time an idle keep-alive connection is kept open.
	IdleTimeout = 2 * time.Minute
)

Timeouts for the HTTP server.

Functions

func Configure

func Configure(m *wserver.Manager, client remote.Client) *gin.Engine

Configure configures the routing infrastructure for this daemon instance.

func ExtractServer added in v1.2.0

func ExtractServer(c *gin.Context) *server.Server

ExtractServer returns the server instance from the gin context. If there is no server set in the context (e.g. calling from a controller not protected by ServerExists) this function will panic.

This function is deprecated. Use middleware.ExtractServer.

func NewServer added in v1.13.4

func NewServer(addr string, handler http.Handler, tlsConfig *tls.Config) *http.Server

NewServer returns an HTTP server for the handler with the timeouts used by Wings.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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