applicationlimits

package
v0.1.0-rc.49 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: BSD-3-Clause Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

package applicationlimits owns validation shared by control and publishers.

Index

Constants

View Source
const DefaultRequestBodyIdleTimeout = 30 * time.Second

Variables

This section is empty.

Functions

func RequestBodyIdleTimeout

func RequestBodyIdleTimeout(value *string) (time.Duration, error)

request body idleness counts only while the publisher is reading incoming bytes. omission selects the default; an explicit duration cannot disable it.

func Valid

func Valid(requests, rateRequests, concurrency int, ratePer time.Duration) bool

Valid checks numeric limits after input-specific parsing. zero requests means no lifetime cap; zero rate and concurrency select publisher defaults.

Types

type Limits

type Limits struct {
	Requests     int
	RateRequests int
	RatePer      time.Duration
	RateBurst    int
	Concurrency  int
}

Limits applies to one publication. zero values select protocol defaults; Requests is an optional lifetime total, not a replenishing quota.

func (Limits) Defaults

func (l Limits) Defaults(tcp bool) Limits

func (Limits) Valid

func (l Limits) Valid() bool

func (Limits) Validate

func (l Limits) Validate() error

Jump to

Keyboard shortcuts

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