package
0.0.0-20200514074722-b64a7ed04815
Repository: https://github.com/qutoutiao/oxy.git
Documentation: pkg.go.dev
# Functions
CondSetter Conditional setter.
ErrorHandler sets error handler of the server.
IsValidExpression check if it's a valid expression.
Logger defines the logger the buffer will use.
MaxRequestBodyBytes sets the maximum request body size in bytes.
MaxResponseBodyBytes sets the maximum request body size in bytes.
MemRequestBodyBytes bytes sets the maximum request body to be stored in memory buffer middleware will serialize the excess to disk.
MemResponseBodyBytes sets the maximum request body to be stored in memory buffer middleware will serialize the excess to disk.
New returns a new buffer middleware.
Retry provides a predicate that allows buffer middleware to replay the request if it matches certain condition, e.g.
# Constants
DefaultMaxBodyBytes No limit by default.
DefaultMaxRetryAttempts Maximum retry attempts.
DefaultMemBodyBytes Store up to 1MB in RAM.
# Structs
Buffer is responsible for buffering requests and responses It buffers large requests and responses to disk,.
SizeErrHandler Size error handler.