httpd

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultWriteTimeout      = time.Second
	DefaultReadTimeout       = time.Second
	DefaultReadHeaderTimeout = time.Second
	DefaultIdleTimeout       = time.Second
)
View Source
const SvcTypeHttpd boot.SvcType = "httpd"

Variables

This section is empty.

Functions

func Handle

func Handle(pattern string, handler http.Handler)

func HandleAPI

func HandleAPI(pattern string, handler APIHandler)

func HandleFunc

func HandleFunc(pattern string, handler http.HandlerFunc)

func ServeMux added in v0.4.8

func ServeMux() *http.ServeMux

Types

type APIHandler

type APIHandler func(http.ResponseWriter, *http.Request) []byte

func (APIHandler) Handle

func (ah APIHandler) Handle(w http.ResponseWriter, r *http.Request) []byte

func (APIHandler) ServeHTTP

func (ah APIHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Cfg

type Cfg struct {
	Addr              string        `` /* 145-byte string literal not displayed */
	WriteTimeout      time.Duration `` /* 183-byte string literal not displayed */
	ReadTimeout       time.Duration `` /* 251-byte string literal not displayed */
	ReadHeaderTimeout time.Duration `` /* 176-byte string literal not displayed */
	IdleTimeout       time.Duration `` /* 206-byte string literal not displayed */
}

func NewCfg

func NewCfg() *Cfg

type Httpd

type Httpd struct {
	runner.Runner
	plugin.Plugin
	*Cfg
	// contains filtered or unexported fields
}

func New

func New() *Httpd

func (*Httpd) AppendError

func (h *Httpd) AppendError(err ...error)

func (*Httpd) GetCfg

func (h *Httpd) GetCfg() interface{}

func (*Httpd) Start

func (h *Httpd) Start() error

func (*Httpd) Stop

func (h *Httpd) Stop() error

func (*Httpd) Type

func (h *Httpd) Type() interface{}

Jump to

Keyboard shortcuts

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