manager

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: Apache-2.0 Imports: 14 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 HttpNotFoundHandler added in v0.9.0

type HttpNotFoundHandler struct {
}

func (*HttpNotFoundHandler) Complete added in v0.9.0

func (*HttpNotFoundHandler) Finish added in v0.9.0

type IManger

type IManger interface {
	Set(id string, port int, hosts []string, method []string, path string, append []AppendRule, router 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 router.IRouterHandler) IRouterData
	Delete(id string) IRouterData
	Parse() (router.IMatcher, error)
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager() *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 router.IRouterHandler) error

func (*Manager) SetGlobalFilters added in v0.10.0

func (m *Manager) SetGlobalFilters(globalFilters *eoscContext.IChainPro)

type NotFoundHandler

type NotFoundHandler struct {
}

type Router

type Router struct {
	Id          string
	Port        int
	Hosts       []string
	Method      []string
	Path        string
	Appends     []AppendRule
	HttpHandler 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() (router.IMatcher, error)

func (*RouterData) Set

func (rs *RouterData) Set(id string, port int, hosts []string, method []string, path string, append []AppendRule, router router.IRouterHandler) IRouterData

Jump to

Keyboard shortcuts

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