Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor NewPool, NewSentinel, and NewCluster to use option pattern.
This is a _slightly_ non-backwards compatible change, which I'm gonna say is fine since this package is technically in (the world's longest) beta. Sentinel and Cluster aren't significantly effected in terms of their behavior, but Pool is. Changes to Pool's default behavior: * When empty the pool will wait a second before creating a new connection. * The pool slowly refills itself, in addition to the normal creation-on-empty logic which was there. In addition there is significantly more cabaility opened up in the Pool's new options, notably the ability to have an overflow bufer. When used via PoolOnFullBuffer the pool won't immediately close connections which are put back into a full Pool. Instead it will buffer them and slowly close them over time, making them available to be used in the meantime.
- Loading branch information
Brian Picciano
committed
Apr 15, 2018
1 parent
ad2e28d
commit 93d26b0
Showing
8 changed files
with
497 additions
and
116 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
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
Oops, something went wrong.