mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Add support for Async worker
This commit is contained in:
@@ -36,6 +36,11 @@ type routesResponse struct {
|
||||
Routes models.Routes `json:"routes"`
|
||||
}
|
||||
|
||||
type tasksResponse struct {
|
||||
Message string `json:"message"`
|
||||
Task models.Task `json:"tasksResponse"`
|
||||
}
|
||||
|
||||
func testRouter() *gin.Engine {
|
||||
r := gin.Default()
|
||||
ctx := context.Background()
|
||||
@@ -44,9 +49,11 @@ func testRouter() *gin.Engine {
|
||||
c.Set("ctx", ctx)
|
||||
c.Next()
|
||||
})
|
||||
bindHandlers(r, func(ctx *gin.Context) {
|
||||
handleRequest(ctx, nil)
|
||||
})
|
||||
bindHandlers(r,
|
||||
func(ctx *gin.Context) {
|
||||
handleRequest(ctx, nil)
|
||||
},
|
||||
func(ctx *gin.Context, del bool) {})
|
||||
return r
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user