buffering

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 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

Init registers the buffering middleware.

Types

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 `json:"max_request_body_size" mapstructure:"max_request_body_size"`
}

Config holds the configuration for the buffering middleware.

type Middleware added in v0.10.0

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

Middleware is a middleware that buffers the request body.

func NewMiddleware

func NewMiddleware(config Config) *Middleware

NewMiddleware creates a new BufferingMiddleware instance.

func (*Middleware) ServeHTTP added in v0.10.0

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

Jump to

Keyboard shortcuts

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