Documentation ¶
Index ¶
- Variables
- func Parse(rules []router.AppendRule) router.MatcherChecker
- type AppendMatcher
- type AppendMatchers
- type CheckMatcher
- type CheckerHandler
- type CheckerSort
- type EmptyMatcher
- type Handler
- type HeaderChecker
- type Hosts
- type IBuilder
- type Paths
- type Ports
- type Root
- type RuleType
- type SimpleMatcher
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorDuplicate = errors.New("duplicate")
Functions ¶
func Parse ¶
func Parse(rules []router.AppendRule) router.MatcherChecker
Types ¶
type AppendMatcher ¶
type AppendMatcher struct {
// contains filtered or unexported fields
}
func (*AppendMatcher) Match ¶
func (a *AppendMatcher) Match(port int, req interface{}) (router.IRouterHandler, bool)
type AppendMatchers ¶
type AppendMatchers []*AppendMatcher
func (AppendMatchers) Len ¶
func (as AppendMatchers) Len() int
func (AppendMatchers) Less ¶
func (as AppendMatchers) Less(i, j int) bool
func (AppendMatchers) Match ¶
func (as AppendMatchers) Match(port int, request interface{}) (router.IRouterHandler, bool)
func (AppendMatchers) Swap ¶
func (as AppendMatchers) Swap(i, j int)
type CheckMatcher ¶
type CheckMatcher struct {
// contains filtered or unexported fields
}
func NewPathMatcher ¶
func NewPathMatcher(equals map[string]router.IMatcher, checkers []*CheckerHandler, all router.IMatcher) *CheckMatcher
func (*CheckMatcher) Match ¶
func (c *CheckMatcher) Match(port int, req interface{}) (router.IRouterHandler, bool)
type CheckerHandler ¶
type CheckerHandler struct {
// contains filtered or unexported fields
}
type CheckerSort ¶
type CheckerSort []*CheckerHandler
func (CheckerSort) Len ¶
func (cs CheckerSort) Len() int
func (CheckerSort) Less ¶
func (cs CheckerSort) Less(i, j int) bool
func (CheckerSort) Swap ¶
func (cs CheckerSort) Swap(i, j int)
type EmptyMatcher ¶
type EmptyMatcher struct {
// contains filtered or unexported fields
}
func (*EmptyMatcher) Match ¶
func (e *EmptyMatcher) Match(port int, request interface{}) (router.IRouterHandler, bool)
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(id string, handler router.IRouterHandler, appends []router.AppendRule) *Handler
type HeaderChecker ¶
func (*HeaderChecker) MatchCheck ¶
func (h *HeaderChecker) MatchCheck(req interface{}) bool
func (*HeaderChecker) Weight ¶
func (h *HeaderChecker) Weight() int
type Hosts ¶
type Hosts struct {
// contains filtered or unexported fields
}
type Paths ¶
type Paths struct {
// contains filtered or unexported fields
}
func (*Paths) Add ¶
func (p *Paths) Add(id string, handler router.IRouterHandler, append []router.AppendRule) error
type Ports ¶
type Ports struct {
// contains filtered or unexported fields
}
type SimpleMatcher ¶
type SimpleMatcher struct {
// contains filtered or unexported fields
}
func (*SimpleMatcher) Match ¶
func (s *SimpleMatcher) Match(port int, req interface{}) (router.IRouterHandler, bool)
Click to show internal directories.
Click to hide internal directories.