Documentation ¶
Index ¶
- func AddFilter(pattern string, pos int, filterFunc context.HandlerFunc)
- func Any(rootPath string, fun context.HandlerFunc)
- func Delete(rootPath string, fun context.HandlerFunc)
- func Delims(left, right string)
- func EnableLimiting(limitType limiting.LimitFlowType, args ...interface{})
- func Get(rootPath string, fun context.HandlerFunc)
- func Head(rootPath string, fun context.HandlerFunc)
- func LoadHTMLFiles(files ...string)
- func LoadHTMLGlob(pattern string)
- func Options(rootPath string, fun context.HandlerFunc)
- func Patch(rootPath string, fun context.HandlerFunc)
- func Post(rootPath string, fun context.HandlerFunc)
- func Put(rootPath string, fun context.HandlerFunc)
- func RegisterController(controller interface{}, mapMethods ...string)
- func Run(addr ...string)
- func RunTLS(certFile, keyFile string, addr ...string)
- func SetFuncMap(funcMap template.FuncMap)
- func Static(relativePath, root string)
- func StaticFile(relativePath, filePath string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFilter ¶
func AddFilter(pattern string, pos int, filterFunc context.HandlerFunc)
AddFilter 添加过滤
func EnableLimiting ¶
func EnableLimiting(limitType limiting.LimitFlowType, args ...interface{})
EnableLimiting 启用限流算法 当是LIMIT_FLOW_COUNTER 第一个参数是流量的总限制,第二个参数是窗口大小 当是LIMIT_FLOW_ROLLING_COUNTER 第一个参数是流量总限制,第二个子窗口个数,第三个是总窗口大小 当LIMIT_FLOW_LEAKY_BUCKET 第一个是流量总大小,第二个参数是流出速度 个/毫秒 当LIMIT_FLOW_TOKEN_BUCKET 第一个参数是流入速度 个/毫秒
func RegisterController ¶
func RegisterController(controller interface{}, mapMethods ...string)
RegisterController 注册控制器
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.