Versions in this module Expand all Collapse all v1 v1.1.0 Jun 23, 2018 Changes in this version type Server + func (s *Server) Shutdown() error v1.0.0 Mar 23, 2018 Changes in this version + const CompressBestCompression + const CompressBestSpeed + const CompressDefaultCompression + const CompressHuffmanOnly + const CompressNoCompression + const DefaultConcurrency + const DefaultDNSCacheDuration + const DefaultDialTimeout + const DefaultLBClientTimeout + const DefaultMaxConnsPerHost + const DefaultMaxIdemponentCallAttempts + const DefaultMaxIdleConnDuration + const DefaultMaxPendingRequests + const DefaultMaxRequestBodySize + const FSCompressedFileSuffix + const FSHandlerCacheDuration + const StatusAccepted + const StatusAlreadyReported + const StatusBadGateway + const StatusBadRequest + const StatusConflict + const StatusContinue + const StatusCreated + const StatusExpectationFailed + const StatusFailedDependency + const StatusForbidden + const StatusFound + const StatusGatewayTimeout + const StatusGone + const StatusHTTPVersionNotSupported + const StatusIMUsed + const StatusInsufficientStorage + const StatusInternalServerError + const StatusLengthRequired + const StatusLocked + const StatusLoopDetected + const StatusMethodNotAllowed + const StatusMovedPermanently + const StatusMultiStatus + const StatusMultipleChoices + const StatusNetworkAuthenticationRequired + const StatusNoContent + const StatusNonAuthoritativeInfo + const StatusNotAcceptable + const StatusNotExtended + const StatusNotFound + const StatusNotImplemented + const StatusNotModified + const StatusOK + const StatusPartialContent + const StatusPaymentRequired + const StatusPermanentRedirect + const StatusPreconditionFailed + const StatusPreconditionRequired + const StatusProcessing + const StatusProxyAuthRequired + const StatusRequestEntityTooLarge + const StatusRequestHeaderFieldsTooLarge + const StatusRequestTimeout + const StatusRequestURITooLong + const StatusRequestedRangeNotSatisfiable + const StatusResetContent + const StatusSeeOther + const StatusServiceUnavailable + const StatusSwitchingProtocols + const StatusTeapot + const StatusTemporaryRedirect + const StatusTooManyRequests + const StatusUnauthorized + const StatusUnavailableForLegalReasons + const StatusUnprocessableEntity + const StatusUnsupportedMediaType + const StatusUpgradeRequired + const StatusUseProxy + const StatusVariantAlsoNegotiates + var CookieExpireDelete = time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC) + var CookieExpireUnlimited = zeroTime + var ErrBodyTooLarge = errors.New("body size exceeds the given limit") + var ErrConcurrencyLimit = errors.New(...) + var ErrConnectionClosed = errors.New(...) + var ErrDialTimeout = errors.New("dialing to the given TCP address timed out") + var ErrKeepaliveTimeout = errors.New("exceeded MaxKeepaliveDuration") + var ErrMissingFile = errors.New("there is no uploaded file associated with the given key") + var ErrNoArgValue = errors.New("no Args value for the given key") + var ErrNoFreeConns = errors.New("no free connections available to host") + var ErrNoMultipartForm = errors.New("request has no multipart/form-data Content-Type") + var ErrPerIPConnLimit = errors.New("too many connections per ip") + var ErrPipelineOverflow = errors.New(...) + var ErrTimeout = errors.New("timeout") + func AppendBytesStr(dst []byte, src string) []byte + func AppendDeflateBytes(dst, src []byte) []byte + func AppendDeflateBytesLevel(dst, src []byte, level int) []byte + func AppendGunzipBytes(dst, src []byte) ([]byte, error) + func AppendGzipBytes(dst, src []byte) []byte + func AppendGzipBytesLevel(dst, src []byte, level int) []byte + func AppendHTMLEscape(dst []byte, s string) []byte + func AppendHTMLEscapeBytes(dst, s []byte) []byte + func AppendHTTPDate(dst []byte, date time.Time) []byte + func AppendIPv4(dst []byte, ip net.IP) []byte + func AppendInflateBytes(dst, src []byte) ([]byte, error) + func AppendNormalizedHeaderKey(dst []byte, key string) []byte + func AppendNormalizedHeaderKeyBytes(dst, key []byte) []byte + func AppendQuotedArg(dst, src []byte) []byte + func AppendUint(dst []byte, n int) []byte + func AppendUnquotedArg(dst, src []byte) []byte + func Dial(addr string) (net.Conn, error) + func DialDualStack(addr string) (net.Conn, error) + func DialDualStackTimeout(addr string, timeout time.Duration) (net.Conn, error) + func DialTimeout(addr string, timeout time.Duration) (net.Conn, error) + func Do(req *Request, resp *Response) error + func DoDeadline(req *Request, resp *Response, deadline time.Time) error + func DoTimeout(req *Request, resp *Response, timeout time.Duration) error + func EqualBytesStr(b []byte, s string) bool + func FileLastModified(path string) (time.Time, error) + func Get(dst []byte, url string) (statusCode int, body []byte, err error) + func GetDeadline(dst []byte, url string, deadline time.Time) (statusCode int, body []byte, err error) + func GetTimeout(dst []byte, url string, timeout time.Duration) (statusCode int, body []byte, err error) + func ListenAndServe(addr string, handler RequestHandler) error + func ListenAndServeTLS(addr, certFile, keyFile string, handler RequestHandler) error + func ListenAndServeTLSEmbed(addr string, certData, keyData []byte, handler RequestHandler) error + func ListenAndServeUNIX(addr string, mode os.FileMode, handler RequestHandler) error + func NewStreamReader(sw StreamWriter) io.ReadCloser + func ParseByteRange(byteRange []byte, contentLength int) (startPos, endPos int, err error) + func ParseHTTPDate(date []byte) (time.Time, error) + func ParseIPv4(dst net.IP, ipStr []byte) (net.IP, error) + func ParseUfloat(buf []byte) (float64, error) + func ParseUint(buf []byte) (int, error) + func Post(dst []byte, url string, postArgs *Args) (statusCode int, body []byte, err error) + func ReleaseArgs(a *Args) + func ReleaseByteBuffer(b *ByteBuffer) + func ReleaseCookie(c *Cookie) + func ReleaseRequest(req *Request) + func ReleaseResponse(resp *Response) + func ReleaseURI(u *URI) + func SaveMultipartFile(fh *multipart.FileHeader, path string) error + func Serve(ln net.Listener, handler RequestHandler) error + func ServeConn(c net.Conn, handler RequestHandler) error + func ServeFile(ctx *RequestCtx, path string) + func ServeFileBytes(ctx *RequestCtx, path []byte) + func ServeFileBytesUncompressed(ctx *RequestCtx, path []byte) + func ServeFileUncompressed(ctx *RequestCtx, path string) + func ServeTLS(ln net.Listener, certFile, keyFile string, handler RequestHandler) error + func ServeTLSEmbed(ln net.Listener, certData, keyData []byte, handler RequestHandler) error + func StatusMessage(statusCode int) string + func WriteDeflate(w io.Writer, p []byte) (int, error) + func WriteDeflateLevel(w io.Writer, p []byte, level int) (int, error) + func WriteGunzip(w io.Writer, p []byte) (int, error) + func WriteGzip(w io.Writer, p []byte) (int, error) + func WriteGzipLevel(w io.Writer, p []byte, level int) (int, error) + func WriteInflate(w io.Writer, p []byte) (int, error) + func WriteMultipartForm(w io.Writer, f *multipart.Form, boundary string) error + type Args struct + func AcquireArgs() *Args + func (a *Args) Add(key, value string) + func (a *Args) AddBytesK(key []byte, value string) + func (a *Args) AddBytesKV(key, value []byte) + func (a *Args) AddBytesV(key string, value []byte) + func (a *Args) AppendBytes(dst []byte) []byte + func (a *Args) CopyTo(dst *Args) + func (a *Args) Del(key string) + func (a *Args) DelBytes(key []byte) + func (a *Args) GetBool(key string) bool + func (a *Args) GetUfloat(key string) (float64, error) + func (a *Args) GetUfloatOrZero(key string) float64 + func (a *Args) GetUint(key string) (int, error) + func (a *Args) GetUintOrZero(key string) int + func (a *Args) Has(key string) bool + func (a *Args) HasBytes(key []byte) bool + func (a *Args) Len() int + func (a *Args) Parse(s string) + func (a *Args) ParseBytes(b []byte) + func (a *Args) Peek(key string) []byte + func (a *Args) PeekBytes(key []byte) []byte + func (a *Args) PeekMulti(key string) [][]byte + func (a *Args) PeekMultiBytes(key []byte) [][]byte + func (a *Args) QueryString() []byte + func (a *Args) Reset() + func (a *Args) Set(key, value string) + func (a *Args) SetBytesK(key []byte, value string) + func (a *Args) SetBytesKV(key, value []byte) + func (a *Args) SetBytesV(key string, value []byte) + func (a *Args) SetUint(key string, value int) + func (a *Args) SetUintBytes(key []byte, value int) + func (a *Args) String() string + func (a *Args) VisitAll(f func(key, value []byte)) + func (a *Args) WriteTo(w io.Writer) (int64, error) + type BalancingClient interface + DoDeadline func(req *Request, resp *Response, deadline time.Time) error + PendingRequests func() int + type ByteBuffer bytebufferpool.ByteBuffer + func AcquireByteBuffer() *ByteBuffer + func (b *ByteBuffer) Reset() + func (b *ByteBuffer) Set(p []byte) + func (b *ByteBuffer) SetString(s string) + func (b *ByteBuffer) Write(p []byte) (int, error) + func (b *ByteBuffer) WriteString(s string) (int, error) + type Client struct + Dial DialFunc + DialDualStack bool + DisableHeaderNamesNormalizing bool + MaxConnsPerHost int + MaxIdleConnDuration time.Duration + MaxResponseBodySize int + Name string + ReadBufferSize int + ReadTimeout time.Duration + TLSConfig *tls.Config + WriteBufferSize int + WriteTimeout time.Duration + func (c *Client) Do(req *Request, resp *Response) error + func (c *Client) DoDeadline(req *Request, resp *Response, deadline time.Time) error + func (c *Client) DoTimeout(req *Request, resp *Response, timeout time.Duration) error + func (c *Client) Get(dst []byte, url string) (statusCode int, body []byte, err error) + func (c *Client) GetDeadline(dst []byte, url string, deadline time.Time) (statusCode int, body []byte, err error) + func (c *Client) GetTimeout(dst []byte, url string, timeout time.Duration) (statusCode int, body []byte, err error) + func (c *Client) Post(dst []byte, url string, postArgs *Args) (statusCode int, body []byte, err error) + type Cookie struct + func AcquireCookie() *Cookie + func (c *Cookie) AppendBytes(dst []byte) []byte + func (c *Cookie) Cookie() []byte + func (c *Cookie) CopyTo(src *Cookie) + func (c *Cookie) Domain() []byte + func (c *Cookie) Expire() time.Time + func (c *Cookie) HTTPOnly() bool + func (c *Cookie) Key() []byte + func (c *Cookie) Parse(src string) error + func (c *Cookie) ParseBytes(src []byte) error + func (c *Cookie) Path() []byte + func (c *Cookie) Reset() + func (c *Cookie) Secure() bool + func (c *Cookie) SetDomain(domain string) + func (c *Cookie) SetDomainBytes(domain []byte) + func (c *Cookie) SetExpire(expire time.Time) + func (c *Cookie) SetHTTPOnly(httpOnly bool) + func (c *Cookie) SetKey(key string) + func (c *Cookie) SetKeyBytes(key []byte) + func (c *Cookie) SetPath(path string) + func (c *Cookie) SetPathBytes(path []byte) + func (c *Cookie) SetSecure(secure bool) + func (c *Cookie) SetValue(value string) + func (c *Cookie) SetValueBytes(value []byte) + func (c *Cookie) String() string + func (c *Cookie) Value() []byte + func (c *Cookie) WriteTo(w io.Writer) (int64, error) + type DialFunc func(addr string) (net.Conn, error) + type ErrSmallBuffer struct + type FS struct + AcceptByteRange bool + CacheDuration time.Duration + Compress bool + CompressedFileSuffix string + GenerateIndexPages bool + IndexNames []string + PathNotFound RequestHandler + PathRewrite PathRewriteFunc + Root string + func (fs *FS) NewRequestHandler() RequestHandler + type HijackHandler func(c net.Conn) + type HostClient struct + Addr string + Dial DialFunc + DialDualStack bool + DisableHeaderNamesNormalizing bool + IsTLS bool + MaxConnDuration time.Duration + MaxConns int + MaxIdemponentCallAttempts int + MaxIdleConnDuration time.Duration + MaxResponseBodySize int + Name string + ReadBufferSize int + ReadTimeout time.Duration + TLSConfig *tls.Config + WriteBufferSize int + WriteTimeout time.Duration + func (c *HostClient) Do(req *Request, resp *Response) error + func (c *HostClient) DoDeadline(req *Request, resp *Response, deadline time.Time) error + func (c *HostClient) DoTimeout(req *Request, resp *Response, timeout time.Duration) error + func (c *HostClient) Get(dst []byte, url string) (statusCode int, body []byte, err error) + func (c *HostClient) GetDeadline(dst []byte, url string, deadline time.Time) (statusCode int, body []byte, err error) + func (c *HostClient) GetTimeout(dst []byte, url string, timeout time.Duration) (statusCode int, body []byte, err error) + func (c *HostClient) LastUseTime() time.Time + func (c *HostClient) PendingRequests() int + func (c *HostClient) Post(dst []byte, url string, postArgs *Args) (statusCode int, body []byte, err error) + type LBClient struct + Clients []BalancingClient + HealthCheck func(req *Request, resp *Response, err error) bool + Timeout time.Duration + func (cc *LBClient) Do(req *Request, resp *Response) error + func (cc *LBClient) DoDeadline(req *Request, resp *Response, deadline time.Time) error + func (cc *LBClient) DoTimeout(req *Request, resp *Response, timeout time.Duration) error + type Logger interface + Printf func(format string, args ...interface{}) + type PathRewriteFunc func(ctx *RequestCtx) []byte + func NewPathPrefixStripper(prefixSize int) PathRewriteFunc + func NewPathSlashesStripper(slashesCount int) PathRewriteFunc + func NewVHostPathRewriter(slashesCount int) PathRewriteFunc + type PipelineClient struct + Addr string + Dial DialFunc + DialDualStack bool + IsTLS bool + Logger Logger + MaxBatchDelay time.Duration + MaxConns int + MaxIdleConnDuration time.Duration + MaxPendingRequests int + ReadBufferSize int + ReadTimeout time.Duration + TLSConfig *tls.Config + WriteBufferSize int + WriteTimeout time.Duration + func (c *PipelineClient) Do(req *Request, resp *Response) error + func (c *PipelineClient) DoDeadline(req *Request, resp *Response, deadline time.Time) error + func (c *PipelineClient) DoTimeout(req *Request, resp *Response, timeout time.Duration) error + func (c *PipelineClient) PendingRequests() int + type Request struct + Header RequestHeader + func AcquireRequest() *Request + func (req *Request) AppendBody(p []byte) + func (req *Request) AppendBodyString(s string) + func (req *Request) Body() []byte + func (req *Request) BodyGunzip() ([]byte, error) + func (req *Request) BodyInflate() ([]byte, error) + func (req *Request) BodyWriteTo(w io.Writer) error + func (req *Request) BodyWriter() io.Writer + func (req *Request) ConnectionClose() bool + func (req *Request) ContinueReadBody(r *bufio.Reader, maxBodySize int) error + func (req *Request) CopyTo(dst *Request) + func (req *Request) Host() []byte + func (req *Request) IsBodyStream() bool + func (req *Request) MayContinue() bool + func (req *Request) MultipartForm() (*multipart.Form, error) + func (req *Request) PostArgs() *Args + func (req *Request) Read(r *bufio.Reader) error + func (req *Request) ReadLimitBody(r *bufio.Reader, maxBodySize int) error + func (req *Request) ReleaseBody(size int) + func (req *Request) RemoveMultipartFormFiles() + func (req *Request) RequestURI() []byte + func (req *Request) Reset() + func (req *Request) ResetBody() + func (req *Request) SetBody(body []byte) + func (req *Request) SetBodyStream(bodyStream io.Reader, bodySize int) + func (req *Request) SetBodyStreamWriter(sw StreamWriter) + func (req *Request) SetBodyString(body string) + func (req *Request) SetConnectionClose() + func (req *Request) SetHost(host string) + func (req *Request) SetHostBytes(host []byte) + func (req *Request) SetRequestURI(requestURI string) + func (req *Request) SetRequestURIBytes(requestURI []byte) + func (req *Request) String() string + func (req *Request) SwapBody(body []byte) []byte + func (req *Request) URI() *URI + func (req *Request) Write(w *bufio.Writer) error + func (req *Request) WriteTo(w io.Writer) (int64, error) + type RequestCtx struct + Request Request + Response Response + func (ctx *RequestCtx) Conn() net.Conn + func (ctx *RequestCtx) ConnID() uint64 + func (ctx *RequestCtx) ConnRequestNum() uint64 + func (ctx *RequestCtx) ConnTime() time.Time + func (ctx *RequestCtx) Error(msg string, statusCode int) + func (ctx *RequestCtx) FormFile(key string) (*multipart.FileHeader, error) + func (ctx *RequestCtx) FormValue(key string) []byte + func (ctx *RequestCtx) Hijack(handler HijackHandler) + func (ctx *RequestCtx) Hijacked() bool + func (ctx *RequestCtx) Host() []byte + func (ctx *RequestCtx) ID() uint64 + func (ctx *RequestCtx) IfModifiedSince(lastModified time.Time) bool + func (ctx *RequestCtx) Init(req *Request, remoteAddr net.Addr, logger Logger) + func (ctx *RequestCtx) Init2(conn net.Conn, logger Logger, reduceMemoryUsage bool) + func (ctx *RequestCtx) IsBodyStream() bool + func (ctx *RequestCtx) IsDelete() bool + func (ctx *RequestCtx) IsGet() bool + func (ctx *RequestCtx) IsHead() bool + func (ctx *RequestCtx) IsPost() bool + func (ctx *RequestCtx) IsPut() bool + func (ctx *RequestCtx) IsTLS() bool + func (ctx *RequestCtx) LastTimeoutErrorResponse() *Response + func (ctx *RequestCtx) LocalAddr() net.Addr + func (ctx *RequestCtx) LocalIP() net.IP + func (ctx *RequestCtx) Logger() Logger + func (ctx *RequestCtx) Method() []byte + func (ctx *RequestCtx) MultipartForm() (*multipart.Form, error) + func (ctx *RequestCtx) NotFound() + func (ctx *RequestCtx) NotModified() + func (ctx *RequestCtx) Path() []byte + func (ctx *RequestCtx) PostArgs() *Args + func (ctx *RequestCtx) PostBody() []byte + func (ctx *RequestCtx) QueryArgs() *Args + func (ctx *RequestCtx) Redirect(uri string, statusCode int) + func (ctx *RequestCtx) RedirectBytes(uri []byte, statusCode int) + func (ctx *RequestCtx) Referer() []byte + func (ctx *RequestCtx) RemoteAddr() net.Addr + func (ctx *RequestCtx) RemoteIP() net.IP + func (ctx *RequestCtx) RequestURI() []byte + func (ctx *RequestCtx) ResetBody() + func (ctx *RequestCtx) SendFile(path string) + func (ctx *RequestCtx) SendFileBytes(path []byte) + func (ctx *RequestCtx) SetBody(body []byte) + func (ctx *RequestCtx) SetBodyStream(bodyStream io.Reader, bodySize int) + func (ctx *RequestCtx) SetBodyStreamWriter(sw StreamWriter) + func (ctx *RequestCtx) SetBodyString(body string) + func (ctx *RequestCtx) SetConnectionClose() + func (ctx *RequestCtx) SetContentType(contentType string) + func (ctx *RequestCtx) SetContentTypeBytes(contentType []byte) + func (ctx *RequestCtx) SetStatusCode(statusCode int) + func (ctx *RequestCtx) SetUserValue(key string, value interface{}) + func (ctx *RequestCtx) SetUserValueBytes(key []byte, value interface{}) + func (ctx *RequestCtx) String() string + func (ctx *RequestCtx) Success(contentType string, body []byte) + func (ctx *RequestCtx) SuccessString(contentType, body string) + func (ctx *RequestCtx) TLSConnectionState() *tls.ConnectionState + func (ctx *RequestCtx) Time() time.Time + func (ctx *RequestCtx) TimeoutError(msg string) + func (ctx *RequestCtx) TimeoutErrorWithCode(msg string, statusCode int) + func (ctx *RequestCtx) TimeoutErrorWithResponse(resp *Response) + func (ctx *RequestCtx) URI() *URI + func (ctx *RequestCtx) UserAgent() []byte + func (ctx *RequestCtx) UserValue(key string) interface{} + func (ctx *RequestCtx) UserValueBytes(key []byte) interface{} + func (ctx *RequestCtx) VisitUserValues(visitor func([]byte, interface{})) + func (ctx *RequestCtx) Write(p []byte) (int, error) + func (ctx *RequestCtx) WriteString(s string) (int, error) + type RequestHandler func(ctx *RequestCtx) + func CompressHandler(h RequestHandler) RequestHandler + func CompressHandlerLevel(h RequestHandler, level int) RequestHandler + func FSHandler(root string, stripSlashes int) RequestHandler + func TimeoutHandler(h RequestHandler, timeout time.Duration, msg string) RequestHandler + type RequestHeader struct + func (h *RequestHeader) Add(key, value string) + func (h *RequestHeader) AddBytesK(key []byte, value string) + func (h *RequestHeader) AddBytesKV(key, value []byte) + func (h *RequestHeader) AddBytesV(key string, value []byte) + func (h *RequestHeader) AppendBytes(dst []byte) []byte + func (h *RequestHeader) ConnectionClose() bool + func (h *RequestHeader) ConnectionUpgrade() bool + func (h *RequestHeader) ContentLength() int + func (h *RequestHeader) ContentType() []byte + func (h *RequestHeader) Cookie(key string) []byte + func (h *RequestHeader) CookieBytes(key []byte) []byte + func (h *RequestHeader) CopyTo(dst *RequestHeader) + func (h *RequestHeader) Del(key string) + func (h *RequestHeader) DelAllCookies() + func (h *RequestHeader) DelBytes(key []byte) + func (h *RequestHeader) DelCookie(key string) + func (h *RequestHeader) DelCookieBytes(key []byte) + func (h *RequestHeader) DisableNormalizing() + func (h *RequestHeader) HasAcceptEncoding(acceptEncoding string) bool + func (h *RequestHeader) HasAcceptEncodingBytes(acceptEncoding []byte) bool + func (h *RequestHeader) Header() []byte + func (h *RequestHeader) Host() []byte + func (h *RequestHeader) IsConnect() bool + func (h *RequestHeader) IsDelete() bool + func (h *RequestHeader) IsGet() bool + func (h *RequestHeader) IsHTTP11() bool + func (h *RequestHeader) IsHead() bool + func (h *RequestHeader) IsPost() bool + func (h *RequestHeader) IsPut() bool + func (h *RequestHeader) Len() int + func (h *RequestHeader) Method() []byte + func (h *RequestHeader) MultipartFormBoundary() []byte + func (h *RequestHeader) Peek(key string) []byte + func (h *RequestHeader) PeekBytes(key []byte) []byte + func (h *RequestHeader) RawHeaders() []byte + func (h *RequestHeader) Read(r *bufio.Reader) error + func (h *RequestHeader) Referer() []byte + func (h *RequestHeader) RequestURI() []byte + func (h *RequestHeader) Reset() + func (h *RequestHeader) ResetConnectionClose() + func (h *RequestHeader) Set(key, value string) + func (h *RequestHeader) SetByteRange(startPos, endPos int) + func (h *RequestHeader) SetBytesK(key []byte, value string) + func (h *RequestHeader) SetBytesKV(key, value []byte) + func (h *RequestHeader) SetBytesV(key string, value []byte) + func (h *RequestHeader) SetCanonical(key, value []byte) + func (h *RequestHeader) SetConnectionClose() + func (h *RequestHeader) SetContentLength(contentLength int) + func (h *RequestHeader) SetContentType(contentType string) + func (h *RequestHeader) SetContentTypeBytes(contentType []byte) + func (h *RequestHeader) SetCookie(key, value string) + func (h *RequestHeader) SetCookieBytesK(key []byte, value string) + func (h *RequestHeader) SetCookieBytesKV(key, value []byte) + func (h *RequestHeader) SetHost(host string) + func (h *RequestHeader) SetHostBytes(host []byte) + func (h *RequestHeader) SetMethod(method string) + func (h *RequestHeader) SetMethodBytes(method []byte) + func (h *RequestHeader) SetMultipartFormBoundary(boundary string) + func (h *RequestHeader) SetMultipartFormBoundaryBytes(boundary []byte) + func (h *RequestHeader) SetReferer(referer string) + func (h *RequestHeader) SetRefererBytes(referer []byte) + func (h *RequestHeader) SetRequestURI(requestURI string) + func (h *RequestHeader) SetRequestURIBytes(requestURI []byte) + func (h *RequestHeader) SetUserAgent(userAgent string) + func (h *RequestHeader) SetUserAgentBytes(userAgent []byte) + func (h *RequestHeader) String() string + func (h *RequestHeader) UserAgent() []byte + func (h *RequestHeader) VisitAll(f func(key, value []byte)) + func (h *RequestHeader) VisitAllCookie(f func(key, value []byte)) + func (h *RequestHeader) Write(w *bufio.Writer) error + func (h *RequestHeader) WriteTo(w io.Writer) (int64, error) + type Response struct + Header ResponseHeader + SkipBody bool + func AcquireResponse() *Response + func (resp *Response) AppendBody(p []byte) + func (resp *Response) AppendBodyString(s string) + func (resp *Response) Body() []byte + func (resp *Response) BodyGunzip() ([]byte, error) + func (resp *Response) BodyInflate() ([]byte, error) + func (resp *Response) BodyWriteTo(w io.Writer) error + func (resp *Response) BodyWriter() io.Writer + func (resp *Response) ConnectionClose() bool + func (resp *Response) CopyTo(dst *Response) + func (resp *Response) IsBodyStream() bool + func (resp *Response) Read(r *bufio.Reader) error + func (resp *Response) ReadLimitBody(r *bufio.Reader, maxBodySize int) error + func (resp *Response) ReleaseBody(size int) + func (resp *Response) Reset() + func (resp *Response) ResetBody() + func (resp *Response) SendFile(path string) error + func (resp *Response) SetBody(body []byte) + func (resp *Response) SetBodyStream(bodyStream io.Reader, bodySize int) + func (resp *Response) SetBodyStreamWriter(sw StreamWriter) + func (resp *Response) SetBodyString(body string) + func (resp *Response) SetConnectionClose() + func (resp *Response) SetStatusCode(statusCode int) + func (resp *Response) StatusCode() int + func (resp *Response) String() string + func (resp *Response) SwapBody(body []byte) []byte + func (resp *Response) Write(w *bufio.Writer) error + func (resp *Response) WriteDeflate(w *bufio.Writer) error + func (resp *Response) WriteDeflateLevel(w *bufio.Writer, level int) error + func (resp *Response) WriteGzip(w *bufio.Writer) error + func (resp *Response) WriteGzipLevel(w *bufio.Writer, level int) error + func (resp *Response) WriteTo(w io.Writer) (int64, error) + type ResponseHeader struct + func (h *ResponseHeader) Add(key, value string) + func (h *ResponseHeader) AddBytesK(key []byte, value string) + func (h *ResponseHeader) AddBytesKV(key, value []byte) + func (h *ResponseHeader) AddBytesV(key string, value []byte) + func (h *ResponseHeader) AppendBytes(dst []byte) []byte + func (h *ResponseHeader) ConnectionClose() bool + func (h *ResponseHeader) ConnectionUpgrade() bool + func (h *ResponseHeader) ContentLength() int + func (h *ResponseHeader) ContentType() []byte + func (h *ResponseHeader) Cookie(cookie *Cookie) bool + func (h *ResponseHeader) CopyTo(dst *ResponseHeader) + func (h *ResponseHeader) Del(key string) + func (h *ResponseHeader) DelAllCookies() + func (h *ResponseHeader) DelBytes(key []byte) + func (h *ResponseHeader) DelClientCookie(key string) + func (h *ResponseHeader) DelClientCookieBytes(key []byte) + func (h *ResponseHeader) DelCookie(key string) + func (h *ResponseHeader) DelCookieBytes(key []byte) + func (h *ResponseHeader) DisableNormalizing() + func (h *ResponseHeader) Header() []byte + func (h *ResponseHeader) IsHTTP11() bool + func (h *ResponseHeader) Len() int + func (h *ResponseHeader) Peek(key string) []byte + func (h *ResponseHeader) PeekBytes(key []byte) []byte + func (h *ResponseHeader) PeekCookie(key string) []byte + func (h *ResponseHeader) Read(r *bufio.Reader) error + func (h *ResponseHeader) Reset() + func (h *ResponseHeader) ResetConnectionClose() + func (h *ResponseHeader) Server() []byte + func (h *ResponseHeader) Set(key, value string) + func (h *ResponseHeader) SetBytesK(key []byte, value string) + func (h *ResponseHeader) SetBytesKV(key, value []byte) + func (h *ResponseHeader) SetBytesV(key string, value []byte) + func (h *ResponseHeader) SetCanonical(key, value []byte) + func (h *ResponseHeader) SetConnectionClose() + func (h *ResponseHeader) SetContentLength(contentLength int) + func (h *ResponseHeader) SetContentRange(startPos, endPos, contentLength int) + func (h *ResponseHeader) SetContentType(contentType string) + func (h *ResponseHeader) SetContentTypeBytes(contentType []byte) + func (h *ResponseHeader) SetCookie(cookie *Cookie) + func (h *ResponseHeader) SetLastModified(t time.Time) + func (h *ResponseHeader) SetServer(server string) + func (h *ResponseHeader) SetServerBytes(server []byte) + func (h *ResponseHeader) SetStatusCode(statusCode int) + func (h *ResponseHeader) StatusCode() int + func (h *ResponseHeader) String() string + func (h *ResponseHeader) VisitAll(f func(key, value []byte)) + func (h *ResponseHeader) VisitAllCookie(f func(key, value []byte)) + func (h *ResponseHeader) Write(w *bufio.Writer) error + func (h *ResponseHeader) WriteTo(w io.Writer) (int64, error) + type Server struct + Concurrency int + DisableHeaderNamesNormalizing bool + DisableKeepalive bool + GetOnly bool + Handler RequestHandler + LogAllErrors bool + Logger Logger + MaxConnsPerIP int + MaxKeepaliveDuration time.Duration + MaxRequestBodySize int + MaxRequestsPerConn int + Name string + NoDefaultServerHeader bool + ReadBufferSize int + ReadTimeout time.Duration + ReduceMemoryUsage bool + WriteBufferSize int + WriteTimeout time.Duration + func (s *Server) AppendCert(certFile, keyFile string) error + func (s *Server) AppendCertEmbed(certData, keyData []byte) error + func (s *Server) ListenAndServe(addr string) error + func (s *Server) ListenAndServeTLS(addr, certFile, keyFile string) error + func (s *Server) ListenAndServeTLSEmbed(addr string, certData, keyData []byte) error + func (s *Server) ListenAndServeUNIX(addr string, mode os.FileMode) error + func (s *Server) Serve(ln net.Listener) error + func (s *Server) ServeConn(c net.Conn) error + func (s *Server) ServeTLS(ln net.Listener, certFile, keyFile string) error + func (s *Server) ServeTLSEmbed(ln net.Listener, certData, keyData []byte) error + type StreamWriter func(w *bufio.Writer) + type URI struct + func AcquireURI() *URI + func (u *URI) AppendBytes(dst []byte) []byte + func (u *URI) CopyTo(dst *URI) + func (u *URI) FullURI() []byte + func (u *URI) Hash() []byte + func (u *URI) Host() []byte + func (u *URI) LastPathSegment() []byte + func (u *URI) Parse(host, uri []byte) + func (u *URI) Path() []byte + func (u *URI) PathOriginal() []byte + func (u *URI) QueryArgs() *Args + func (u *URI) QueryString() []byte + func (u *URI) RequestURI() []byte + func (u *URI) Reset() + func (u *URI) Scheme() []byte + func (u *URI) SetHash(hash string) + func (u *URI) SetHashBytes(hash []byte) + func (u *URI) SetHost(host string) + func (u *URI) SetHostBytes(host []byte) + func (u *URI) SetPath(path string) + func (u *URI) SetPathBytes(path []byte) + func (u *URI) SetQueryString(queryString string) + func (u *URI) SetQueryStringBytes(queryString []byte) + func (u *URI) SetScheme(scheme string) + func (u *URI) SetSchemeBytes(scheme []byte) + func (u *URI) String() string + func (u *URI) Update(newURI string) + func (u *URI) UpdateBytes(newURI []byte) + func (u *URI) WriteTo(w io.Writer) (int64, error)