Help us shape the future of Go! Take the 2026 Go Developer Survey

buffering

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init added in v0.9.0

func Init() error

Types

type BufferingMiddleware

type BufferingMiddleware struct {
	// contains filtered or unexported fields
}

func NewMiddleware

func NewMiddleware(config Config) *BufferingMiddleware

func (*BufferingMiddleware) ServeHTTP

func (m *BufferingMiddleware) ServeHTTP(ctx context.Context, c *app.RequestContext)

type Config

type Config struct {
	// MaxRequestBodySize limits the maximum number of bytes for the request body.
	// Default 4194304 (4MB) if not specified or set to 0.
	MaxRequestBodySize int64 `mapstructure:"max_request_body_size" json:"max_request_body_size"`
}

Config holds the configuration for the buffering middleware.

Jump to

Keyboard shortcuts

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