manager

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

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) Delete

func (m *Manager) Delete(id string)

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

Jump to

Keyboard shortcuts

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