package
Version:
v1.8.2
Opens a new window with list of versions in this module.
Published: Nov 7, 2021
License: MIT
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Blocklist struct {
Logger Logger
}
Blocklist holds a list of IP ranges in a Segment Tree structure for faster lookups.
New returns a new Blocklist.
Blocked returns true if ip is in Blocklist.
Len returns the number of rules in the Blocklist.
Reload the segment tree by reading new rules from a io.Reader.
type Logger func(format string, v ...interface{})
Source Files
¶
Directories
¶
Package stree implements a segment tree and serial algorithm to query intervals
|
Package stree implements a segment tree and serial algorithm to query intervals |
Click to show internal directories.
Click to hide internal directories.