harness-drone/router/middleware/bus.go

15 lines
210 B
Go
Raw Normal View History

2016-04-20 01:37:53 +00:00
package middleware
import (
"github.com/drone/drone/bus"
"github.com/gin-gonic/gin"
)
func Bus() gin.HandlerFunc {
bus_ := bus.New()
return func(c *gin.Context) {
bus.ToContext(c, bus_)
c.Next()
}
}