httpd

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultWriteTimeout      = 30 * time.Second
	DefaultReadTimeout       = 60 * time.Second
	DefaultReadHeaderTimeout = 5 * time.Second
	DefaultIdleTimeout       = 30 * time.Second
)
View Source
const DaemonTypeHTTPd boot.DaemonType = "httpd"

Variables

This section is empty.

Functions

func New

func New() boot.Daemon

Types

type Cfg

type Cfg struct {
	Addr              string        `` /* 131-byte string literal not displayed */
	WriteTimeout      time.Duration `` /* 169-byte string literal not displayed */
	ReadTimeout       time.Duration `` /* 237-byte string literal not displayed */
	ReadHeaderTimeout time.Duration `` /* 162-byte string literal not displayed */
	IdleTimeout       time.Duration `` /* 192-byte string literal not displayed */
}

func NewCfg

func NewCfg() *Cfg

type HTTPd

type HTTPd interface {
	boot.Daemon
	SetRouter(Router)
	Server() *http.Server
	Use(...func(http.Handler) http.Handler)
	Handle(string, http.Handler)
	HandleFunc(string, func(http.ResponseWriter, *http.Request))
}

type Router

type Router interface {
	http.Handler
	Handle(string, http.Handler)
	HandleFunc(string, func(http.ResponseWriter, *http.Request))
}

Jump to

Keyboard shortcuts

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