Documentation ¶
Overview ¶
* @Descripttion: 基础过滤器,用于扩展 * @version: 1.0.0 * @Author: lfzxs@qq.com * @Date: 2023-05-10 14:11:08 * @LastEditors: lfzxs@qq.com * @LastEditTime: 2023-05-11 15:14:06
* @Descripttion: 路径匹配过滤器 * @version: 1.0.0 * @Author: lfzxs@qq.com * @Date: 2023-05-09 14:56:49 * @LastEditors: lfzxs@qq.com * @LastEditTime: 2023-05-11 15:35:00
* @Descripttion:url 监控 * @version: v1.0.0 * @Author: lfzxs@qq.com * @Date: 2023-05-10 17:57:59 * @LastEditors: lfzxs@qq.com * @LastEditTime: 2023-05-11 15:21:13
Index ¶
- func AddNotify(bm *BaseMiddleware, fun NotifyFun)
- func NewMatchMiddleware(name string, middleware ghttp.HandlerFunc, options ...MatchOption) *matchMiddleware
- func NewMonitorMiddleware(options ...MonitorOption) *monitorMiddleware
- type BaseMiddleware
- type MatchOption
- type MonitorOption
- type NotifyFun
- type NotifyMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddNotify ¶ added in v0.9.2
func AddNotify(bm *BaseMiddleware, fun NotifyFun)
func NewMatchMiddleware ¶
func NewMatchMiddleware(name string, middleware ghttp.HandlerFunc, options ...MatchOption) *matchMiddleware
func NewMonitorMiddleware ¶ added in v0.9.2
func NewMonitorMiddleware(options ...MonitorOption) *monitorMiddleware
Types ¶
type BaseMiddleware ¶
type BaseMiddleware struct {
// contains filtered or unexported fields
}
func (*BaseMiddleware) SendNotify ¶ added in v0.9.2
func (bm *BaseMiddleware) SendNotify(sender any, msg NotifyMap)
type MatchOption ¶ added in v0.9.1
type MatchOption func(mm *matchMiddleware)
func WithEnanle ¶
func WithEnanle(enable bool) MatchOption
func WithLogger ¶ added in v0.9.1
func WithLogger(logger slog.Logger) MatchOption
type MonitorOption ¶ added in v0.9.2
type MonitorOption func(mm *monitorMiddleware)
func WithNotifys ¶ added in v0.9.2
func WithNotifys(notifys []NotifyFun) MonitorOption
func WithShowHeader ¶ added in v0.9.2
func WithShowHeader(showHeader bool) MonitorOption
Click to show internal directories.
Click to hide internal directories.