Documentation ¶
Overview ¶
@Title Engine.go @Description 引擎的主要实现文件 @Author Dorbmon
Index ¶
- Constants
- func RemoveContext(context *Context)
- func ToRWebMethod(Method []byte) int
- type Context
- type DefaultLog
- type DefaultRouter
- func (z *DefaultRouter) AddInterceptor(interceptor Interceptor)
- func (z *DefaultRouter) Bind(address string, method int, handler Handler) error
- func (z *DefaultRouter) BindSubRouter(other Router)
- func (z *DefaultRouter) GetFromSubRouter(context *Context) Handler
- func (z *DefaultRouter) GetHandler(context *Context) Handler
- func (z *DefaultRouter) LoadFromRouter(other Router)
- func (z *DefaultRouter) OutputRules() []*RouterHandler
- func (z *DefaultRouter) SetBasicRoute(basic string)
- type Engine
- type Handler
- type Interceptor
- type Log
- type Router
- type RouterHandler
Constants ¶
View Source
const ( MethodPost = iota MethodGet MethodHead MethodPut MethodPatch MethodDelete MethodConnect MethodOptions MethodTrace MethodAll MethodUnknown )
Variables ¶
This section is empty.
Functions ¶
func RemoveContext ¶
func RemoveContext(context *Context)
func ToRWebMethod ¶
Types ¶
type Context ¶
type Context struct { RequestUri string Method int RawCtx *fasthttp.RequestCtx }
func CtxToContext ¶
func CtxToContext(ctx *fasthttp.RequestCtx) *Context
func NewContext ¶
func NewContext() (ret *Context)
type DefaultLog ¶
type DefaultLog struct { }
func (*DefaultLog) FrameworkPrintMessage ¶
func (z *DefaultLog) FrameworkPrintMessage(Module, Message string, Level int)
type DefaultRouter ¶
type DefaultRouter struct {
// contains filtered or unexported fields
}
func NewDefaultRouter ¶
func NewDefaultRouter() (r DefaultRouter)
func (*DefaultRouter) AddInterceptor ¶ added in v0.0.8
func (z *DefaultRouter) AddInterceptor(interceptor Interceptor)
func (*DefaultRouter) Bind ¶
func (z *DefaultRouter) Bind(address string, method int, handler Handler) error
func (*DefaultRouter) BindSubRouter ¶
func (z *DefaultRouter) BindSubRouter(other Router)
func (*DefaultRouter) GetFromSubRouter ¶
func (z *DefaultRouter) GetFromSubRouter(context *Context) Handler
func (*DefaultRouter) GetHandler ¶
func (z *DefaultRouter) GetHandler(context *Context) Handler
func (*DefaultRouter) LoadFromRouter ¶ added in v0.0.6
func (z *DefaultRouter) LoadFromRouter(other Router)
func (*DefaultRouter) OutputRules ¶ added in v0.0.6
func (z *DefaultRouter) OutputRules() []*RouterHandler
func (*DefaultRouter) SetBasicRoute ¶ added in v0.0.7
func (z *DefaultRouter) SetBasicRoute(basic string)
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) RunAndServe ¶
type Interceptor ¶ added in v0.0.8
type Router ¶
type Router interface { Bind(address string, method int, handler Handler) error GetHandler(context *Context) Handler BindSubRouter(Router) // 挂载子路由 LoadFromRouter(Router) // 复制子路由的数据 OutputRules() []*RouterHandler AddInterceptor(interceptor Interceptor) }
type RouterHandler ¶ added in v0.0.6
Directories ¶
Path | Synopsis |
---|---|
@Title WebsocketDealer.go @Description 实现websocket低成本call 需要客户端配合 @Author Dorbmon
|
@Title WebsocketDealer.go @Description 实现websocket低成本call 需要客户端配合 @Author Dorbmon |
Click to show internal directories.
Click to hide internal directories.