rules

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 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

func NewRouter() *Router

func (*Router) AddRule

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

type RouterRuleConfig interface {
	Rules() []Rule
}

type Rule

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