Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parser ¶
type Parser interface {
Parse(b []byte) (state RequestState, extra []byte, err error)
}
type RequestState ¶
type RequestState uint8
RequestState represents the state of the request's parsing
const ( Pending RequestState = iota + 1 HeadersCompleted Error )
type Serializer ¶ added in v0.15.0
type Serializer interface { PreWrite(target proto.Proto, response *http.Response) Write(target proto.Proto, request *http.Request, response *http.Response, writer Writer) error }
Serializer converts an HTTP response builder into bytes and writes it
type Transport ¶
type Transport interface { Parser Serializer }
Transport is a general pair of a parser and a dumper. Usually consists of both belonging to a same protocol major version
Click to show internal directories.
Click to hide internal directories.