Commit Graph

9 Commits

Author SHA1 Message Date
Derrick J. Wippler
bde4250129
Fix LRU to correctly update expire on value replace (#56) 2022-12-20 11:35:12 -06:00
Nathan Johnson
8c6aae6360 Removes hard dependency on logrus for logging
Provides backwards compatibility with existing logrus via SetLogger() method

Introduces a Logger interface that others can implement for other
structured loggers such as zerolog.

Add SetLoggerFromLogger method that allows caller to pass in an implementation
of the new Logger interface.

Bumps the golang.org/x/sys dependency since tests fail to run on go 1.18 with the old version.

adding a test case for LogrusLogger

adding benchmark, add WithFields method because it's a lot faster apparently
2022-06-01 19:16:44 -05:00
Derrick Wippler
1e232d778c Group.Set() now populates the main cache, and optionally the hotcache 2021-05-01 17:02:17 -05: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
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
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
8b0de5a71a Changed module paths to reflect breaking change v2 2019-06-03 11:08:54 -05:00
Derrick J. Wippler
1ee6a96d83
Update go.mod 2019-04-10 15:05:45 -05:00
Derrick J. Wippler
e72846e064 Added support for go modules 2019-04-09 17:36:47 -05:00