Help us shape the future of Go! Take the 2026 Go Developer Survey

ratelimit

package
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2025 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NoopLimiter

type NoopLimiter struct{}

func NewNoopLimiter

func NewNoopLimiter() *NoopLimiter

func (*NoopLimiter) IsRateLimited

func (l *NoopLimiter) IsRateLimited(address flow.Address) bool

type RateLimiter

type RateLimiter interface {
	// IsRateLimited returns true if the address is rate limited
	IsRateLimited(address flow.Address) bool
}

RateLimiter is an interface for checking if an address is rate limited. By convention, the address used is the payer field of a transaction. This rate limiter is applied when a transaction is first received by a node, meaning that if a transaction is rate-limited it will be dropped.

Jump to

Keyboard shortcuts

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