limit

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: MIT, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Reader

func Reader(r io.Reader, ctx context.Context, limiter *rate.Limiter) io.Reader

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

func Writer

func Writer(w io.Writer, ctx context.Context, limiter *rate.Limiter) io.Writer

Writer returns a reader 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