limiter

package
v0.0.4-rc Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientLimiter

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

func NewClientLimiter

func NewClientLimiter(burst int, maxRate float64) *ClientLimiter

func (*ClientLimiter) Cleanup

func (cm *ClientLimiter) Cleanup(timeout time.Duration)

func (*ClientLimiter) Limit

func (cm *ClientLimiter) Limit(next http.Handler) http.Handler

Jump to

Keyboard shortcuts

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