Documentation ¶
Index ¶
- func TCPBlackListMiddleware() func(c *TcpSliceRouterContext)
- func TCPFlowCountMiddleware() func(c *TcpSliceRouterContext)
- func TCPFlowLimitMiddleware() func(c *TcpSliceRouterContext)
- func TCPWhiteListMiddleware() func(c *TcpSliceRouterContext)
- type TcpHandlerFunc
- type TcpSliceGroup
- type TcpSliceRouter
- type TcpSliceRouterContext
- type TcpSliceRouterHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TCPBlackListMiddleware ¶
func TCPBlackListMiddleware() func(c *TcpSliceRouterContext)
匹配接入方式 基于请求信息
func TCPFlowCountMiddleware ¶
func TCPFlowCountMiddleware() func(c *TcpSliceRouterContext)
func TCPFlowLimitMiddleware ¶
func TCPFlowLimitMiddleware() func(c *TcpSliceRouterContext)
func TCPWhiteListMiddleware ¶
func TCPWhiteListMiddleware() func(c *TcpSliceRouterContext)
匹配接入方式 基于请求信息
Types ¶
type TcpSliceGroup ¶
type TcpSliceGroup struct { *TcpSliceRouter // contains filtered or unexported fields }
group 结构体
func (*TcpSliceGroup) Use ¶
func (g *TcpSliceGroup) Use(middlewares ...TcpHandlerFunc) *TcpSliceGroup
构造回调方法
type TcpSliceRouter ¶
type TcpSliceRouter struct {
// contains filtered or unexported fields
}
router 结构体
type TcpSliceRouterContext ¶
type TcpSliceRouterContext struct { Ctx context.Context *TcpSliceGroup // contains filtered or unexported fields }
router上下文
func (*TcpSliceRouterContext) Get ¶
func (c *TcpSliceRouterContext) Get(key interface{}) interface{}
func (*TcpSliceRouterContext) Set ¶
func (c *TcpSliceRouterContext) Set(key, val interface{})
type TcpSliceRouterHandler ¶
type TcpSliceRouterHandler struct {
// contains filtered or unexported fields
}
func NewTcpSliceRouterHandler ¶
func NewTcpSliceRouterHandler(coreFunc func(*TcpSliceRouterContext) tcp_server.TCPHandler, router *TcpSliceRouter) *TcpSliceRouterHandler
Click to show internal directories.
Click to hide internal directories.