ratelimit

package
v2.16.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReader

func NewReader(r io.Reader, l *rate.Limiter) io.Reader

NewReader returns a reader that is rate limited by the given token bucket. Each token in the bucket represents one byte.

func NewWriter

func NewWriter(w io.Writer, l *rate.Limiter) io.Writer

NewWriter returns a writer that is rate limited by the given token bucket. Each token in the bucket represents one byte.

Types

This section is empty.

Jump to

Keyboard shortcuts

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