Commit Graph

126 Commits

Author SHA1 Message Date
Derrick J. Wippler
075b815c22
Merge pull request #31 from mailgun/neill/develop
Adding Set to Groupcache
2022-01-06 12:28:30 -06:00
censhin
bd86e3ce96 fix(http.go): passing body to NewRequestWithContext() in makeRequest() 2021-10-04 16:07:31 -04:00
censhin
26cee4afba fix(http.go): removing variable that doesn't exist 2021-10-04 15:37:49 -04:00
censhin
1081294c45 chore(all): merging master and resolving conflicts 2021-10-04 15:23:05 -04:00
censhin
8dfc9d6c7c Merge branch 'neill/develop' of github.com:mailgun/groupcache into neill/develop 2021-10-04 15:21:07 -04:00
Derrick J. Wippler
144bfc1a6e
Merge pull request #32 from develar/http-with-context
simplify code — use NewRequestWithContext API to create request
2021-10-04 14:19:02 -05:00
develar
a6ecc9438e simplify code — use NewRequestWithContext API to create request 2021-09-22 15:07:29 +02:00
Derrick Wippler
e5d79909ab Minimal go lang version target is 1.13 2021-05-03 17:43:11 -05:00
Derrick Wippler
27b25db9ae Minimal go lang version target is 1.13 2021-05-03 11:32:41 -05:00
Derrick Wippler
1e232d778c Group.Set() now populates the main cache, and optionally the hotcache 2021-05-01 17:02:17 -05:00
censhin
3e480ca15c refactor(all): changing the value passed and stored as a byte slice 2021-04-30 11:23:41 -04:00
censhin
a88b9ce0a6 feat(all): setting a ByteView after marshaling the value into a byte buffer 2021-04-30 11:09:01 -04:00
censhin
fa896fa6c1 feat(groupcache.go): adding duration hardcoded at 60 minutes, will need to parameterize this 2021-04-30 02:22:05 -04:00
censhin
7b47233b4b feat(all): adding setter to cache a specific value 2021-04-29 17:21:31 -04:00
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