service/vendor/github.com/xxl-job/xxl-job-executor-go/middleware.go

12 lines
244 B
Go
Raw Normal View History

2024-01-17 19:52:54 +08:00
package xxl
// Middleware 中间件构造函数
type Middleware func(TaskFunc) TaskFunc
func (e *executor) chain(next TaskFunc) TaskFunc {
for i := range e.middlewares {
next = e.middlewares[len(e.middlewares)-1-i](next)
}
return next
}