utils

package
v0.0.0-...-675700b Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsIPInCIDR

func IsIPInCIDR(ip net.IP, cidr string) bool

Types

type Limiter

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

func NewLimiter

func NewLimiter(ipBurst int, userBurst int, resetInterval time.Duration) *Limiter

func (*Limiter) AllowIP

func (ul *Limiter) AllowIP(ip string) bool

func (*Limiter) AllowUser

func (ul *Limiter) AllowUser(user string) bool

Jump to

Keyboard shortcuts

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