This allows users to escalate a graceful shutdown to a forceful one if
there are active connections that are taking too long to finish their
requests.
Fixes#94.
This backends to the listener.DrainAll functionality I just added,
allowing impatient users to shut down their services immediately and
un-gracefully if they want.
This is now controlled at the top level goji package: these packages are
not even compiled in when using App Engine. This is sensible, since
neither package is of any use there.
This change makes package graceful/listener track all connections that
have been Accepted, not just the ones considered idle. The motivation
here is to support a DrainAll function on graceful listeners, allowing
users an alternative to patiently waiting (potentially forever) for
in-use connections to become idle.
It was exposed mostly for documentation of a Go 1.2 polyfill, and really
doesn't feel like it should be exposed long-term, since it hasn't done
anything in frightfully long.
This is a breaking change for advanced users of package graceful, for
which there is unfortunately no easy workaround (at least for Go 1.2
users, which are the ~only ones affected).
Go's regular expressions don't allow you to create a capturing group
named "*", which previously made using SubRouter with regular expression
patterns impossible. This change introduces the alternate key "_", which
happens to be a legal capturing group name.
Fixes#98.
This change addresses the POODLE vulnerability [0]. Unfortunately it
makes package graceful's behavior here slightly different than the stock
net/http methods of the same name, but I think that's fine in this
situation.
[0]: https://www.openssl.org/~bodo/ssl-poodle.pdf
Thanks to @ekanna for reporting this. Fixes#101.
This change refactors package graceful into two packages: one very well
tested package that deals with graceful shutdown of arbitrary
net.Listeners in the abstract, and one less-well-tested package that
works with the nitty-gritty details of net/http and signal handling.
This is a breaking API change for advanced users of package graceful:
the WrapConn function no longer exists. This shouldn't affect most users
or use cases.
In particular, these started failing when running tests under the race
detector in Go 1.4 [0], probably due to some kind of (GC?) hijinks
clearing out the sync.Pool.
[0]: these tests might have also failed in 1.3, but I didn't check
Breaking changes:
Changed from pointers to value arguments.
If this breaks your code, use latest stable v1 (tag:v1.1.0).
You could also use gopkg.in: go get http://gopkg.in/blang/semver.v1
"util" is a really bad name for a package since it isn't very
descriptive and so often collides with other names.
Unfortunately, this is a breaking change, but it's both very easy to fix
and perhaps more importantly also better to do now than later.
This is pretty frustrating: it doesn't look like it's going to be easy
to get the "cover" tool to work across both 1.3 and 1.4, since they
aren't able to agree on where to install the tool from. I'm sure there's
a way to work around this, but in the meantime let's just disable
coverage testing entirely.