Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions sqs-samples/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ func main() {

r := gin.Default()

// Liveness/readiness endpoint. Static routes take precedence over the
// "/:param" wildcard in gin, so this is not shadowed by getURL. Lets the
// replay driver gate on real app readiness (keploy --health-url) instead of
// a fixed --delay, which under CI contention fired requests before the app
// was serving and produced spurious "status_code got=0" failures.
r.GET("/healthz", func(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{"status": "ok"})
})

r.GET("/:param", getURL)
r.POST("/url", putURL)
srv := &http.Server{
Expand Down
Loading