Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RuleTree ¶
type RuleTree[T Data] struct { // contains filtered or unexported fields }
RuleTree is a trie-based matcher that is capable of parsing Adblock-style and hosts rules and matching URLs against them.
It is safe for concurrent use.
func NewRuleTree ¶
func (*RuleTree[T]) FindMatchingRulesReq ¶
FindMatchingRulesReq finds all rules that match the given request.
func (*RuleTree[T]) FindMatchingRulesRes ¶
FindMatchingRulesRes finds all rules that match the given response. It assumes that the request that generated the response has already been matched by FindMatchingRulesReq.
type TokenInterner ¶ added in v0.11.2
type TokenInterner struct {
// contains filtered or unexported fields
}
TokenInterner hands out a small integer for each unique string.
func NewTokenInterner ¶ added in v0.11.2
func NewTokenInterner() *TokenInterner
func (*TokenInterner) Intern ¶ added in v0.11.2
func (in *TokenInterner) Intern(s string) uint32
Intern returns the unique ID for s, assigning a new one if needed.
Click to show internal directories.
Click to hide internal directories.