quotas

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2019 License: MIT Imports: 2 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Policy

type Policy interface {
	// Allow attempts to allow a request to go through. The method returns
	// immediately with a true or false indicating if the request can make
	// progress
	Allow() bool
}

Policy corresponds to a quota policy. A policy allows implementing layered and more complex rate limiting functionality.

func NewSimpleRateLimiter

func NewSimpleRateLimiter(tb tokenbucket.TokenBucket) Policy

NewSimpleRateLimiter returns a new simple rate limiter

Jump to

Keyboard shortcuts

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