Andrey Meshkov f1791135af Sync v2.11.0
2024-12-05 14:19:25 +03:00

26 lines
659 B
Go

// Package rulestat contains the filtering rule statistics collector and API.
package rulestat
import (
"context"
"github.com/AdguardTeam/AdGuardDNS/internal/filter"
)
// Interface is an ephemeral storage of the filtering rule list statistics
// interface.
//
// All methods must be safe for concurrent use.
type Interface interface {
Collect(ctx context.Context, id filter.ID, r filter.RuleText)
}
// type check
var _ Interface = Empty{}
// Empty is an Interface implementation that does nothing.
type Empty struct{}
// Collect implements the Interface interface for Empty.
func (Empty) Collect(_ context.Context, _ filter.ID, _ filter.RuleText) {}