Commit Graph

112 Commits

Author SHA1 Message Date
Derrick J. Wippler
2fc526bccc
Update README.md
It should be clear you must include self when calling `pool.Set()` See #27
2021-04-06 14:07:06 -05:00
Derrick J. Wippler
6251eaf9b8
Merge pull request #25 from mailgun/thrawn/develop
Consistent hash improvements
2021-01-13 14:45:55 -06:00
Derrick J. Wippler
ff66388131 Consistenthash improvements
* Now uses the much faster fnv1
* Now md5 hashs the keys to help distribute hosts more evenly in some
  cases.
2021-01-13 14:24:22 -06:00
Derrick J. Wippler
65c4ea5d77
Clarify the use of groupcache.NewHTTPPoolOpts() in the documentation
Fixes #20
2020-11-19 20:12:15 -06:00
Derrick J. Wippler
8672aac324
Merge pull request #22 from rickypai/patch-1
test against 1.13.x, 1.14.x, and 1.15.x
2020-10-26 21:23:03 -05:00
Ricky Pai
35c1ab8391
test against 1.13.x, 1.14.x, and 1.15.x 2020-10-16 22:08:30 -07:00
Derrick J. Wippler
0b906d9259
Update CHANGELOG 2020-07-09 10:36:01 -05:00
Derrick J. Wippler
829b71f0ed
Merge pull request #18 from Tommy-42/tommy-42/add_metrics_and_logger
Add new metric And logger possiblity for peers error
2020-07-09 10:29:42 -05:00
Tommy PAGEARD
5b70a612a7 test(): remove unused method GetURL(key string) 2020-07-09 11:31:16 +02:00
Tommy PAGEARD
6308e62bbb style(metrics): rename get from peers stats 2020-07-08 19:01:58 +02:00
Tommy PAGEARD
fb2028f2ff fix(): get URL from httpGetter instead of httpPool 2020-07-08 18:59:59 +02:00
Derrick J. Wippler
26cd2cefd5
Merge pull request #15 from inhuman/master
DeregisterGroup
2020-07-08 11:45:42 -05:00
Derrick J. Wippler
7dd8e405d0
Merge pull request #17 from derekperkins/patch-1
fix goroutine race condition
2020-07-08 11:42:48 -05:00
Tommy PAGEARD
ae2e156f19 fix(metrics): use backward compatible time computation for duration 2020-07-08 16:49:30 +02:00
Tommy PAGEARD
3f7232faca feat(peer): add GetURL to be able to retrieve peer url 2020-07-08 14:21:49 +02:00
Tommy PAGEARD
b543958475 fix(datarace): pass peer var as param for func literal
peer var was being accessed by scope heritage instead of being passed as param.
making it unsafe to data race.
2020-07-06 18:56:33 +02:00
Tommy PAGEARD
121623bc02 feat(logger): add a new field category in the log 2020-07-06 18:55:56 +02:00
Tommy PAGEARD
14bc5ab47f feat(metrics/logger): add new metric And logger possiblity for peers error
Introducing a new metric GetFromPeersSlowestDuration which will be recording the slowest
call made to getFromPeers.

Introducing SetLogger() to set a logger and allow getFromPeers error to be logged of.
2020-07-06 18:55:17 +02:00
Derek Perkins
3979bf0f99
fix type 2020-06-19 23:51:41 -06:00
Derek Perkins
3f29740e18
fix goroutine race condition 2020-06-19 23:41:42 -06:00
id
f06dad867e feat(add DeregisterGroup method): DeregisterGroup removes group from group pool 2020-05-05 16:03:10 +03:00
Derrick J. Wippler
ba255c644a
Merge pull request #13 from mailgun/thrawn/develop
Removed tabs from README example
2020-01-05 15:54:44 -06:00
Derrick J. Wippler
06245be9e2 Removed tabs from README example, github renders the tabs as 8 spaces each which is crazy 2020-01-05 15:54:31 -06:00
Derrick J. Wippler
ff2d1f161e
Update README.md 2019-06-10 15:35:07 -05:00
Derrick J. Wippler
e1f81f6bb1
Update README.md 2019-06-10 15:33:49 -05:00
Derrick J. Wippler
f90a77a9bb
Merge pull request #10 from mailgun/thrawn/develop
Get() now returns immediately when context is done
2019-06-10 15:26:13 -05:00
Derrick J. Wippler
48a0ce2463 Get() now returns immediately when context is done
* `Get()` now returns immediately when context is done during a groupcache peer
  conversation. Previously `Get()` would call the `Getter` with a done context.
2019-06-10 14:16:39 -05:00
Derrick J. Wippler
b9bcb40345
Removed Release Candidate from Changelog 2019-06-04 17:07:29 -05:00
Derrick J. Wippler
7a39b5a63a
Merge pull request #8 from mailgun/thrawn/develop
Release Candidate 2.0.0-rc.4
2019-06-04 15:02:42 -05:00
Derrick J. Wippler
76b3cd49b6 Reverted change to associate Transport to httpGetter.
This change caused a data race during async calls to groupcache.Get().
Also discovered `DefaultTransport` has per address connection pooling
only when the request was a success, which is sufficient for most use
cases.
2019-06-04 14:53:24 -05:00
Derrick J. Wippler
c2015034f2
Merge pull request #7 from mailgun/thrawn/develop
Fix HTTPPoolOptions.Transport
2019-06-04 10:46:59 -05:00
Derrick J. Wippler
2869a0ce28 HTTPPoolOptions.Transport is now used instead of DefaultTransport when provided 2019-06-04 10:02:19 -05:00
Derrick J. Wippler
554745c665
Merge pull request #6 from mailgun/thrawn/develop
Release Candidate RC2
2019-06-03 11:16:14 -05:00
Derrick J. Wippler
8b0de5a71a Changed module paths to reflect breaking change v2 2019-06-03 11:08:54 -05:00
Derrick J. Wippler
4b81d84061
Merge pull request #5 from mailgun/thrawn/develop
Release Candidate 2.0
2019-06-03 10:55:26 -05:00
Derrick J. Wippler
054f2178b4 Client keep-alives and hotcache changes
* Now Associating the transport with peer `httpGetter` so we take advantage of
  connection reuse.  This lowers the impact on DNS and improves preformance for
  high request volume low latency applications.
* Now always populating the hotcache. A more complex algorithm is unnecessary
  when the LRU cache will ensure the most used values remain in the cache. The
  evict code ensures the hotcache does not over crowd the maincache.
2019-06-03 10:20:40 -05:00
Derrick J. Wippler
9a873a72e5 Added a CHANGELOG file 2019-05-30 17:24:49 -05:00
Derrick J. Wippler
f352930de5 Now using context.Context instead of groupcache.Context 2019-05-30 17:03:06 -05:00
Derrick J. Wippler
a5eee224aa http requests now respect context.Context done 2019-05-30 16:47:38 -05:00
Derrick J. Wippler
9dade9087a
Merge pull request #4 from mailgun/thrawn/develop
Remove() now inits peers if needed
2019-05-23 15:17:25 -05:00
Derrick J. Wippler
2e501aa922 Remove() Now returns the body on non 200 response 2019-05-23 15:09:56 -05:00
Derrick J. Wippler
2ce33c3fea Remove now inits peers if needed 2019-05-23 12:40:01 -05:00
Derrick J. Wippler
82209d3632
Merge pull request #3 from mailgun/thrawn/develop
PIP-407: Added support for key removal within a group
2019-05-15 13:21:10 -05:00
Derrick J. Wippler
4f7e5ecf8c Added support for key removal within a group 2019-04-11 10:50:29 -05:00
Derrick J. Wippler
d6e54d2323
Merge pull request #2 from mailgun/thrawn/develop
Changed import path to mailgun/groupcache
2019-04-10 15:10:02 -05:00
Derrick J. Wippler
a4f69dc48c Changed import path to mailgun/groupcache 2019-04-10 15:09:20 -05:00
Derrick J. Wippler
1ee6a96d83
Update go.mod 2019-04-10 15:05:45 -05:00
Derrick J. Wippler
b9520c6403
Merge pull request #1 from mailgun/add-ttl
PIP-405: Sinks can now accept an expire time
2019-04-10 15:03:41 -05:00
Derrick J. Wippler
e72846e064 Added support for go modules 2019-04-09 17:36:47 -05:00
Derrick J. Wippler
ce8fe99325 Sinks can not accept an expire time 2019-04-09 17:36:03 -05:00