ratelimiter

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2022 License: LGPL-3.0 Imports: 8 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 interface {
	LimitRequest(stid sttypes.StreamID)

	p2ptypes.LifeCycle
}

RateLimiter is the interface to limit the incoming request. The purpose of rate limiter is to prevent the node from running out of resource for consensus on DDoS attacks.

func NewRateLimiter

func NewRateLimiter(sm streammanager.Subscriber, global, single int) RateLimiter

NewRateLimiter creates a new rate limiter

Jump to

Keyboard shortcuts

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