Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPRequestsParser ¶
type HTTPRequestsParser interface { Parse(b []byte) (state RequestState, extra []byte, err error) Release() }
HTTPRequestsParser is a general interface for every http parser Currently only http1 parser is presented, but hope in future there are will be at least http2 parser
type RequestState ¶
type RequestState uint8
RequestState is a general state of the parser that tells a caller about current state of the request. It may be incomplete (Pending), complete (HeadersCompleted), and completed with an error (Error). Due to internal approaches of body handling, parser does not manage requests bodies.
const ( Pending RequestState = iota + 1 HeadersCompleted Error )
Click to show internal directories.
Click to hide internal directories.