limiter

package
Version: v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2019 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConcurrencyLimiter

func NewConcurrencyLimiter(handler http.Handler, concurrencyLimit int) http.Handler

NewConcurrencyLimiter creates a handler which limits the active number of active, concurrent requests. If the concurrency limit is less than, or equal to 0, then it will just return the handler passed to it.

Types

type ConcurrencyLimiter

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

func (*ConcurrencyLimiter) ServeHTTP

func (cl *ConcurrencyLimiter) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL