ratelimiter

package
v0.62.2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RateLimiter

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

func NewRateLimiter

func NewRateLimiter(limitPerSec float64, metricSetter func(v float64)) *RateLimiter

func (*RateLimiter) Account

func (r *RateLimiter) Account(key string) bool

func (*RateLimiter) Start

func (r *RateLimiter) Start()

func (*RateLimiter) Stop

func (r *RateLimiter) Stop()

Jump to

Keyboard shortcuts

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