requestsize

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const PluginName = "request_size_limiter"

PluginName is the catalog name used in policy configuration.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin struct{}

Plugin enforces request body size limits.

func New

func New() *Plugin

New builds a request size limiter.

func (*Plugin) Execute

func (*Plugin) MandatoryStages

func (p *Plugin) MandatoryStages() []policy.Stage

func (*Plugin) Name

func (p *Plugin) Name() string

func (*Plugin) SupportedModes

func (p *Plugin) SupportedModes() []policy.Mode

func (*Plugin) SupportedStages

func (p *Plugin) SupportedStages() []policy.Stage

func (*Plugin) ValidateConfig

func (p *Plugin) ValidateConfig(settings map[string]any) error

type RequestSizeLimiterData

type RequestSizeLimiterData struct {
	RequestSizeBytes   int    `json:"request_size_bytes"`
	RequestSizeChars   int    `json:"request_size_chars"`
	MaxSizeBytes       int    `json:"max_size_bytes"`
	MaxCharsPerRequest int    `json:"max_chars_per_request"`
	LimitExceeded      bool   `json:"limit_exceeded"`
	ExceededType       string `json:"exceeded_type,omitempty"`
}

RequestSizeLimiterData is the per-invocation trace payload describing the measured request size and whether a configured limit was exceeded.

Jump to

Keyboard shortcuts

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