Documentation
¶
Overview ¶
Package debug 提供全局 debug HTTP 路由聚合器(基于 Fiber)。
各子模块通过 debug/bootstrap.RegisterAll() 向全局 App 注册路由; 主 HTTP/gRPC 服务器通过 app.Use("/debug", debug.App()) 挂载。
鉴权由 debug/debug 子包的全局中间件负责:
- 来自 loopback 地址(127.0.0.1 / ::1)的请求免 token(基于客户端 IP)
- 非本地访问需携带 token(query/header/cookie),可在配置 debug.password 中设置
Index ¶
- func All(path string, handler any, handlers ...any)
- func App() *fiber.App
- func Delete(path string, handler any, handlers ...any)
- func Get(path string, handler any, handlers ...any)
- func Group(prefix string, handlers ...any)
- func Head(path string, handler any, handlers ...any)
- func Patch(path string, handler any, handlers ...any)
- func Post(path string, handler any, handlers ...any)
- func Put(path string, handler any, handlers ...any)
- func Route(prefix string, fn func(router fiber.Router), name ...string)
- func Static(prefix, root string, config ...static.Config)
- func Wrap(h http.Handler) fiber.Handler
- func WrapFunc(h http.HandlerFunc) fiber.Handler
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package bootstrap registers built-in debug routes on the global debug App.
|
Package bootstrap registers built-in debug routes on the global debug App. |
|
Package debug 注册 debug 控制台主页与全局鉴权中间件。
|
Package debug 注册 debug 控制台主页与全局鉴权中间件。 |
|
Package featurehttp 提供 feature flags 的 HTTP 调试接口
|
Package featurehttp 提供 feature flags 的 HTTP 调试接口 |
Click to show internal directories.
Click to hide internal directories.