Skip to content

Commit

Permalink
Add function to upgrade connection in http router
Browse files Browse the repository at this point in the history
  • Loading branch information
AmanAgnihotri committed Apr 12, 2024
1 parent c3c57ce commit 03a99b1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/infra/web/http/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@

package http

import (
"github.com/lesismal/nbio/nbhttp/websocket"
)

type Router interface {
Handle(pattern string, handler func(ctx *Context))
HandleWithAuth(pattern string, handler func(ctx *Context))
Upgrade(ctx *Context) (*websocket.Conn, error)
}

0 comments on commit 03a99b1

Please sign in to comment.