lists

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListCache

type ListCache struct {
	// contains filtered or unexported fields
}

func NewListCache

func NewListCache(t ListCacheType, groupToLinks map[string][]string, refreshPeriod int) *ListCache

func (*ListCache) Configuration

func (b *ListCache) Configuration() (result []string)

func (*ListCache) Match

func (b *ListCache) Match(domain string, groupsToCheck []string) (found bool, group string)

type ListCacheType

type ListCacheType int
const (
	BLACKLIST ListCacheType = iota
	WHITELIST
)

func (ListCacheType) String

func (l ListCacheType) String() string

type Matcher

type Matcher interface {
	// matches passed domain name against cached list entries
	Match(domain string, groupsToCheck []string) (found bool, group string)

	// returns current configuration and stats
	Configuration() []string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL