Documentation ¶
Index ¶
- Variables
- type AnyCondition
- type CIDRMatcher
- type Condition
- type ConditionChan
- type DomainStrategy
- type IPv4Matcher
- type NetworkMatcher
- type PlainDomainMatcher
- type PortMatcher
- type RegexpDomainMatcher
- type Router
- type RouterFactory
- type RouterRuleConfig
- type RoutingEntry
- type RoutingTable
- type Rule
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DomainAsIs = DomainStrategy(0) AlwaysUseIP = DomainStrategy(1) UseIPIfNonMatch = DomainStrategy(2) )
Functions ¶
This section is empty.
Types ¶
type AnyCondition ¶ added in v1.9.1
type AnyCondition []Condition
func NewAnyCondition ¶ added in v1.9.1
func NewAnyCondition() *AnyCondition
func (*AnyCondition) Add ¶ added in v1.9.1
func (this *AnyCondition) Add(cond Condition) *AnyCondition
func (*AnyCondition) Apply ¶ added in v1.9.1
func (this *AnyCondition) Apply(dest v2net.Destination) bool
func (*AnyCondition) Len ¶ added in v1.9.1
func (this *AnyCondition) Len() int
type CIDRMatcher ¶ added in v1.9.1
type CIDRMatcher struct {
// contains filtered or unexported fields
}
func NewCIDRMatcher ¶ added in v1.9.1
func NewCIDRMatcher(ipnet string) (*CIDRMatcher, error)
func (*CIDRMatcher) Apply ¶ added in v1.9.1
func (this *CIDRMatcher) Apply(dest v2net.Destination) bool
type Condition ¶ added in v1.9.1
type Condition interface {
Apply(dest v2net.Destination) bool
}
type ConditionChan ¶ added in v1.9.1
type ConditionChan []Condition
func NewConditionChan ¶ added in v1.9.1
func NewConditionChan() *ConditionChan
func (*ConditionChan) Add ¶ added in v1.9.1
func (this *ConditionChan) Add(cond Condition) *ConditionChan
func (*ConditionChan) Apply ¶ added in v1.9.1
func (this *ConditionChan) Apply(dest v2net.Destination) bool
func (*ConditionChan) Len ¶ added in v1.9.1
func (this *ConditionChan) Len() int
type IPv4Matcher ¶ added in v1.9.1
type IPv4Matcher struct {
// contains filtered or unexported fields
}
func NewIPv4Matcher ¶ added in v1.9.1
func NewIPv4Matcher(ipnet *v2net.IPNet) *IPv4Matcher
func (*IPv4Matcher) Apply ¶ added in v1.9.1
func (this *IPv4Matcher) Apply(dest v2net.Destination) bool
type NetworkMatcher ¶ added in v1.9.1
type NetworkMatcher struct {
// contains filtered or unexported fields
}
func NewNetworkMatcher ¶ added in v1.9.1
func NewNetworkMatcher(network *v2net.NetworkList) *NetworkMatcher
func (*NetworkMatcher) Apply ¶ added in v1.9.1
func (this *NetworkMatcher) Apply(dest v2net.Destination) bool
type PlainDomainMatcher ¶ added in v1.9.1
type PlainDomainMatcher struct {
// contains filtered or unexported fields
}
func NewPlainDomainMatcher ¶ added in v1.9.1
func NewPlainDomainMatcher(pattern string) *PlainDomainMatcher
func (*PlainDomainMatcher) Apply ¶ added in v1.9.1
func (this *PlainDomainMatcher) Apply(dest v2net.Destination) bool
type PortMatcher ¶ added in v1.9.1
type PortMatcher struct {
// contains filtered or unexported fields
}
func NewPortMatcher ¶ added in v1.9.1
func NewPortMatcher(portRange v2net.PortRange) *PortMatcher
func (*PortMatcher) Apply ¶ added in v1.9.1
func (this *PortMatcher) Apply(dest v2net.Destination) bool
type RegexpDomainMatcher ¶ added in v1.9.1
type RegexpDomainMatcher struct {
// contains filtered or unexported fields
}
func NewRegexpDomainMatcher ¶ added in v1.9.1
func NewRegexpDomainMatcher(pattern string) (*RegexpDomainMatcher, error)
func (*RegexpDomainMatcher) Apply ¶ added in v1.9.1
func (this *RegexpDomainMatcher) Apply(dest v2net.Destination) bool
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func NewRouter ¶ added in v1.1.1
func NewRouter(config *RouterRuleConfig, space app.Space) *Router
func (*Router) ResolveIP ¶ added in v1.13.1
func (this *Router) ResolveIP(dest v2net.Destination) []v2net.Destination
@Private
type RouterFactory ¶
type RouterFactory struct { }
type RouterRuleConfig ¶ added in v1.1.1
type RouterRuleConfig struct { Rules []*Rule DomainStrategy DomainStrategy }
type RoutingEntry ¶ added in v1.17.1
type RoutingEntry struct {
// contains filtered or unexported fields
}
func (*RoutingEntry) Expired ¶ added in v1.17.1
func (this *RoutingEntry) Expired() bool
func (*RoutingEntry) Extend ¶ added in v1.17.1
func (this *RoutingEntry) Extend()
type RoutingTable ¶ added in v1.17.1
func NewRoutingTable ¶ added in v1.17.1
func NewRoutingTable() *RoutingTable
func (*RoutingTable) Cleanup ¶ added in v1.17.1
func (this *RoutingTable) Cleanup()
func (*RoutingTable) Get ¶ added in v1.17.1
func (this *RoutingTable) Get(destination string) (bool, string, error)
func (*RoutingTable) Set ¶ added in v1.17.1
func (this *RoutingTable) Set(destination string, tag string, err error)
Click to show internal directories.
Click to hide internal directories.