package
Version:
v1.13.0
Opens a new window with list of versions in this module.
Published: Sep 18, 2024
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 {
}
Blocklist holds a list of IP ranges in a Segment Tree structure for faster lookups.
New returns a new Blocklist.
NewLogger returns a new Blocklist with a logger that prints error messages during loading.
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.
Logger prints error messages during loading. Arguments are handled in the manner of fmt.Printf.
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.