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 HandleAPI ¶
func HandleAPI(pattern string, handler APIHandler)
func HandleFunc ¶
func HandleFunc(pattern string, handler http.HandlerFunc)
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 */
}
type Httpd ¶
func (*Httpd) AppendError ¶
Click to show internal directories.
Click to hide internal directories.