sdns: Index | Files

package blocklist

import ""


Package Files

blocklist.go updater.go

type BlockList Uses

type BlockList struct {
    // contains filtered or unexported fields

BlockList type

func New Uses

func New(cfg *config.Config) *BlockList

New returns a new BlockList

func (*BlockList) Exists Uses

func (b *BlockList) Exists(key string) bool

Exists returns whether or not a key exists in the cache

func (*BlockList) Get Uses

func (b *BlockList) Get(key string) (bool, error)

Get returns the entry for a key or an error

func (*BlockList) Length Uses

func (b *BlockList) Length() int

Length returns the caches length

func (*BlockList) Name Uses

func (b *BlockList) Name() string

Name return middleware name

func (*BlockList) Remove Uses

func (b *BlockList) Remove(key string)

Remove removes an entry from the cache

func (*BlockList) ServeDNS Uses

func (b *BlockList) ServeDNS(ctx context.Context, ch *middleware.Chain)

ServeDNS implements the Handle interface.

func (*BlockList) Set Uses

func (b *BlockList) Set(key string)

Set sets a value in the BlockList

Package blocklist imports 17 packages (graph) and is imported by 2 packages. Updated 2020-10-29. Refresh now. Tools for package owners.