policies_ex

package
v0.0.0-...-5dcd16a Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Implementations for the interfaces provided by the 'policies' packages. Aka 'github.com/maxymania/fastnntp-polyglot/policies'. This package is meant to implement a more efficient and effective policies.DeflateFunction as well as more flexible and useful policies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Layer

type Layer struct {
	Inner      gold.PostingPolicyLite
	Element    []LayerElement
	PerformAll bool
}

func (*Layer) DecideLite

func (l *Layer) DecideLite(groups [][]byte, lines, length int64) gold.PostingDecisionLite

type LayerElement

type LayerElement struct {
	ExpireDays int

	Criteria *Matcher
}

type Matcher

type Matcher struct {
	Newsgroups, Except, Exclude *regexp.Regexp

	SizeMin, SizeMax, LinesMin, LinesMax int64
}

func (*Matcher) Match

func (m *Matcher) Match(groups [][]byte, lines, length int64) bool

type MatcherConfig

type MatcherConfig struct {
	Newsgroups string         `inn:"newsgroups"`
	Except     string         `inn:"except"`
	Exclude    string         `inn:"exclude"`
	Size       format.Range64 `inn:"size"`
	Lines      format.Range64 `inn:"lines"`
}

func (*MatcherConfig) Build

func (c *MatcherConfig) Build(m *Matcher)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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