Documentation
¶
Index ¶
- type BlockList
- func (b *BlockList) Exists(key string) bool
- func (b *BlockList) Get(key string) (bool, error)
- func (b *BlockList) Length() int
- func (b *BlockList) Name() string
- func (b *BlockList) Remove(key string) bool
- func (b *BlockList) ServeDNS(ctx context.Context, ch *middleware.Chain)
- func (b *BlockList) Set(key string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockList ¶
type BlockList struct {
// contains filtered or unexported fields
}
BlockList type Supports wildcard domains like "*.example.com" to block all subdomains.
func New ¶
New returns a new BlockList.
Configured whitelist/blocklist entries and existing local blocklist files are loaded synchronously so filtering is active as soon as New returns. Remote blocklist refresh runs asynchronously — a slow or unreachable source used to leave ServeDNS with empty maps for the entire HTTP timeout window even when local files were available.
func (*BlockList) Exists ¶
(*BlockList).Exists exists returns whether or not a key exists in the cache.
Click to show internal directories.
Click to hide internal directories.