analyzer

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BloomFalsePositiveRate = 0.01
View Source
var BloomMaxCapacity uint = 100000

Functions

This section is empty.

Types

type Analyzer

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

func New

func New(cfg Config) *Analyzer

func (*Analyzer) Blocked

func (a *Analyzer) Blocked(ip string) bool

func (*Analyzer) Close

func (a *Analyzer) Close()

func (*Analyzer) Record

func (a *Analyzer) Record(ip, path string)

type Config

type Config struct {
	Window        time.Duration
	PageThreshold int
	QueueCap      int
}

type Counter

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

func NewCounter

func NewCounter() *Counter

func (*Counter) Clear

func (c *Counter) Clear()

func (*Counter) Count

func (c *Counter) Count(ip string) uint16

func (*Counter) Visit

func (c *Counter) Visit(ip string) uint16

type DoubleBufferBloom

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

func NewDoubleBufferBloom

func NewDoubleBufferBloom() *DoubleBufferBloom

func (*DoubleBufferBloom) Rotate

func (dbf *DoubleBufferBloom) Rotate()

func (*DoubleBufferBloom) TestAndAdd

func (dbf *DoubleBufferBloom) TestAndAdd(key []byte) bool

type Request

type Request struct {
	IP   string
	Path uint64
}

Jump to

Keyboard shortcuts

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