ratelimiter

package
v0.0.0-...-117abf3 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VerifiedJoinChannel = RateLimit{
	Count: 1800,
	Time:  time.Second * 12,
}

Functions

func New

func New() instance.RateLimiter

Types

type RateLimit

type RateLimit struct {
	Count int
	Time  time.Duration
}

type RateLimiter

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

func (*RateLimiter) RequestJoin

func (r *RateLimiter) RequestJoin(ctx context.Context, channel *pb.Channel) error

func (*RateLimiter) Start

func (r *RateLimiter) Start()

Jump to

Keyboard shortcuts

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