limiter

package
v2.8.15 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	Allow(ctx context.Context) bool
}

func NewService

func NewService(name string, ops ...Option) Interface

type Option

type Option func(*service) error

func WithMaxQueue

func WithMaxQueue(i uint) Option

func WithRPS

func WithRPS(i uint) Option

func WithTimeout

func WithTimeout(t time.Duration) Option

func WithUnbalance

func WithUnbalance(t time.Duration) Option

Jump to

Keyboard shortcuts

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