woodpecker/router/middleware/stream.go
2016-04-19 18:37:53 -07:00

14 lines
228 B
Go

package middleware
import (
"github.com/drone/drone/stream"
"github.com/gin-gonic/gin"
)
func Stream() gin.HandlerFunc {
stream_ := stream.New()
return func(c *gin.Context) {
stream.ToContext(c, stream_)
c.Next()
}
}