mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-22 16:36:30 +00:00
14 lines
222 B
Go
14 lines
222 B
Go
package middleware
|
|
|
|
import (
|
|
"github.com/drone/drone/queue"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func Queue() gin.HandlerFunc {
|
|
queue_ := queue.New()
|
|
return func(c *gin.Context) {
|
|
queue.ToContext(c, queue_)
|
|
c.Next()
|
|
}
|
|
}
|