forked from gin-gonic/gin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add new capability to limit accepted connections
add internal package which includes json package (gin-gonic#1504) chore: update vendor version (gin-gonic#1520) chore: update issue_implate (gin-gonic#1524) docs: add fnproject to gin's user list (gin-gonic#1505) example for RunLimited example for RunLimited add new capability to limit accepted connections Add golang 1.11.x testing (gin-gonic#1514) * Add golang 1.11.x testing * remove the latest golang testing See the issue: gin-gonic#1510 Update README.md (gin-gonic#1509) change `ShouldBindXML` to `ShouldBindJSON` add internal package which includes json package (gin-gonic#1504) chore: update vendor version (gin-gonic#1520) chore: update issue_implate (gin-gonic#1524) docs: add fnproject to gin's user list (gin-gonic#1505) added new capability to limit the accepted requests example for RunLimited example for RunLimited
- Loading branch information
Jim Lambert
committed
Sep 11, 2018
1 parent
0da5b0c
commit abb9d47
Showing
13 changed files
with
88 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ go: | |
- 1.8.x | ||
- 1.9.x | ||
- 1.10.x | ||
- master | ||
- 1.11.x | ||
|
||
git: | ||
depth: 10 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package main | ||
|
||
import "github.com/gin-gonic/gin" | ||
|
||
const maxConnections = 10 | ||
func main() { | ||
r := gin.Default() | ||
r.GET("/ping", func(c *gin.Context) { | ||
c.JSON(200, gin.H{ | ||
"message": "pong", | ||
}) | ||
}) | ||
r.RunLimited(maxConnections, ":80") // listen and serve on 0.0.0.0:8080 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters