jonmorehouse / gatekeeper

a pluggable http routing runtime
12 stars 1 forks source link

net/http wrapper and scaffolding integration #2

Closed jonmorehouse closed 8 years ago

jonmorehouse commented 8 years ago

For the next bit of work, let's actually listen for and accept TCP connections along the proxy handler.

Specifically, we'll want to set IO deadlines and maintain a for loop which continually re-sets the deadline for us. This will allow us, from within Server.Run to gracefully stop accepting connections on behalf of the Exit or GracefulExit methods.

Here's a pretty solid overview: https://rcrowley.org/articles/golang-graceful-stop.html

Secondly, let's add a "Ping" handler which returns "OK" or something like that for all received connections.

jonmorehouse commented 8 years ago

Resolved by #4