rules

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2015 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InvalidRule      = errors.New("Invalid Rule")
	NoRuleApplicable = errors.New("No rule applicable")
)

Functions

This section is empty.

Types

type Router

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

func NewRouter added in v1.1.1

func NewRouter() *Router

func (*Router) AddRule added in v1.1.1

func (this *Router) AddRule(rule Rule) *Router

func (*Router) TakeDetour

func (this *Router) TakeDetour(dest v2net.Destination) (string, error)

type RouterFactory

type RouterFactory struct {
}

func (*RouterFactory) Create

func (this *RouterFactory) Create(rawConfig interface{}) (router.Router, error)

type RouterRuleConfig added in v1.1.1

type RouterRuleConfig interface {
	Rules() []Rule
}

type Rule added in v1.1.1

type Rule interface {
	Tag() string
	Apply(dest v2net.Destination) bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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