docs: add comprehensive package documentation for rulematcher

- Add detailed package documentation to engine.go explaining the rule matching
  system, supported rule types (Network, MAC, Domain), and priority ordering
- Include usage example demonstrating typical API usage patterns
- Remove unused Type() method from RuleMatcher interface and implementations
- Maintain backward compatibility while improving code documentation

The documentation explains the policy-based DNS routing system and how different
rule types interact with configurable priority ordering.
This commit is contained in:
Cuong Manh Le
2025-09-22 14:10:06 +07:00
committed by Cuong Manh Le
parent 9b1f102315
commit 6aedc2b2d3
6 changed files with 38 additions and 17 deletions
-5
View File
@@ -8,11 +8,6 @@ import (
// MacRuleMatcher handles matching of MAC address-based rules
type MacRuleMatcher struct{}
// Type returns the rule type for MAC matcher
func (m *MacRuleMatcher) Type() RuleType {
return RuleTypeMac
}
// Match evaluates MAC address rules against the source MAC address
func (m *MacRuleMatcher) Match(ctx context.Context, req *MatchRequest) *MatchResult {
if req.Policy == nil || len(req.Policy.Macs) == 0 {