mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-08-10 13:20:33 +02:00
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:
@@ -7,11 +7,6 @@ import (
|
||||
// DomainRuleMatcher handles matching of domain-based rules
|
||||
type DomainRuleMatcher struct{}
|
||||
|
||||
// Type returns the rule type for domain matcher
|
||||
func (d *DomainRuleMatcher) Type() RuleType {
|
||||
return RuleTypeDomain
|
||||
}
|
||||
|
||||
// Match evaluates domain rules against the requested domain
|
||||
func (d *DomainRuleMatcher) Match(ctx context.Context, req *MatchRequest) *MatchResult {
|
||||
if req.Policy == nil || len(req.Policy.Rules) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user