Skip to content

Commit

Permalink
wip: added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
plyr4 committed Feb 24, 2023
1 parent cdec885 commit 2a2f783
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 0 additions & 2 deletions api/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import (
"github.com/gin-gonic/gin"
)

var idx = 1

func Register(c *gin.Context) {

// extract the deadloop channel that was packed into gin context
Expand Down
3 changes: 3 additions & 0 deletions cmd/vela-worker/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ func (w *Worker) server() (http.Handler, *tls.Config) {
middleware.Executors(w.Executors),
middleware.Secret(w.Config.Server.Secret),
middleware.Logger(logrus.StandardLogger(), time.RFC3339, true),

// middleware that puts the deadloop channel in the gin context
// this lets us send messages back to operate.go
func(c *gin.Context) {
c.Set("deadloop", w.Deadloop)
c.Next()
Expand Down
1 change: 0 additions & 1 deletion router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,5 @@ func Load(options ...gin.HandlerFunc) *gin.Engine {

// endpoint for passing a new registration token to the deadloop running operate.go
r.GET("/register", api.Register)

return r
}

0 comments on commit 2a2f783

Please sign in to comment.