parser

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: MIT Imports: 0 Imported by: 0

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
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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