ratelimiter

package
v1.0.2-issue649 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2019 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Limiter

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

Limiter keeps track of an api rate limit and wont let you pass the limit

func New

func New(domain string, apiLimit time.Duration) *Limiter

New creates a new call rate limiter for a single domain

func (*Limiter) Wait

func (limiter *Limiter) Wait()

Wait will block until enough time has passed and the limit will not be passed

Jump to

Keyboard shortcuts

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