Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppendRule ¶
type AppendRule = http_router.AppendRule
type IManger ¶
type IManger interface {
Set(id string, port int, hosts []string, method []string, path string, append []AppendRule, router http_router.IRouterHandler) error
Delete(id string)
}
type IRouterData ¶
type IRouterData interface {
Set(id string, port int, hosts []string, method []string, path string, append []AppendRule, router http_router.IRouterHandler) IRouterData
Delete(id string) IRouterData
Parse() (http_router.IMatcher, error)
}
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(tf traffic.ITraffic, listenCfg *config.ListensMsg, globalFilters eoscContext.IChainPro) *Manager
NewManager 创建路由管理器
func (*Manager) FastHandler ¶
func (m *Manager) FastHandler(port int, ctx *fasthttp.RequestCtx)
func (*Manager) Set ¶
func (m *Manager) Set(id string, port int, hosts []string, method []string, path string, append []AppendRule, router http_router.IRouterHandler) error
type NotFoundHandler ¶
type NotFoundHandler struct {
}
func (*NotFoundHandler) Complete ¶
func (m *NotFoundHandler) Complete(ctx eoscContext.EoContext) error
func (*NotFoundHandler) Finish ¶
func (m *NotFoundHandler) Finish(ctx eoscContext.EoContext) error
type Router ¶
type Router struct {
Id string
Port int
Hosts []string
Method []string
Path string
Appends []AppendRule
HttpHandler http_router.IRouterHandler
}
type RouterData ¶
type RouterData struct {
// contains filtered or unexported fields
}
func (*RouterData) Delete ¶
func (rs *RouterData) Delete(id string) IRouterData
func (*RouterData) Parse ¶
func (rs *RouterData) Parse() (http_router.IMatcher, error)
func (*RouterData) Set ¶
func (rs *RouterData) Set(id string, port int, hosts []string, method []string, path string, append []AppendRule, router http_router.IRouterHandler) IRouterData
Click to show internal directories.
Click to hide internal directories.