router

package
v0.12.12 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const All = "*"

Variables

This section is empty.

Functions

func Key added in v0.10.0

func Key(rules []AppendRule) string

Types

type AppendRule added in v0.10.0

type AppendRule struct {
	Type    string
	Name    string
	Pattern string
}

type AppendRules added in v0.10.0

type AppendRules []AppendRule

func (AppendRules) Len added in v0.10.0

func (as AppendRules) Len() int

func (AppendRules) Less added in v0.10.0

func (as AppendRules) Less(i, j int) bool

func (AppendRules) Swap added in v0.10.0

func (as AppendRules) Swap(i, j int)

type EmptyChecker added in v0.10.0

type EmptyChecker struct {
}

func (*EmptyChecker) MatchCheck added in v0.10.0

func (e *EmptyChecker) MatchCheck(request interface{}) bool

func (*EmptyChecker) Weight added in v0.10.0

func (e *EmptyChecker) Weight() int

type IMatcher added in v0.10.0

type IMatcher interface {
	Match(port int, request interface{}) (IRouterHandler, bool)
}

type IRouterHandler added in v0.10.0

type IRouterHandler interface {
	ServeHTTP(ctx eoscContext.EoContext)
}

type MatcherChecker added in v0.10.0

type MatcherChecker interface {
	MatchCheck(request interface{}) bool
	Weight() int
}

type MatcherCheckerItem added in v0.10.0

type MatcherCheckerItem interface {
	checker.Checker
	MatcherChecker
}

type RuleCheckers added in v0.10.0

type RuleCheckers []MatcherCheckerItem

func (RuleCheckers) Len added in v0.10.0

func (rs RuleCheckers) Len() int

func (RuleCheckers) Less added in v0.10.0

func (rs RuleCheckers) Less(i, j int) bool

func (RuleCheckers) MatchCheck added in v0.10.0

func (rs RuleCheckers) MatchCheck(request interface{}) bool

func (RuleCheckers) Swap added in v0.10.0

func (rs RuleCheckers) Swap(i, j int)

func (RuleCheckers) Weight added in v0.10.0

func (rs RuleCheckers) Weight() int

type RuleType added in v0.10.0

type RuleType = string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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