prometheus-adapter/vendor/github.com/hashicorp/golang-lru
Solly Ross c916572aca Update deps to Kube 1.11.3
This updates the dependencies to Kube 1.11.3 to pull in a fix allowing
requestheader auth to be used without normal client auth (which makes
things work on clusters that don't enable client auth normally, like
EKS).
2018-09-24 14:47:22 -04:00
..
simplelru Update deps to Kube 1.11.3 2018-09-24 14:47:22 -04:00
.gitignore Check in the vendor directory 2018-07-13 17:32:49 -04:00
2q.go Check in the vendor directory 2018-07-13 17:32:49 -04:00
arc.go Check in the vendor directory 2018-07-13 17:32:49 -04:00
doc.go Check in the vendor directory 2018-07-13 17:32:49 -04:00
go.mod Update deps to Kube 1.11.3 2018-09-24 14:47:22 -04:00
LICENSE Check in the vendor directory 2018-07-13 17:32:49 -04:00
lru.go Check in the vendor directory 2018-07-13 17:32:49 -04:00
README.md Check in the vendor directory 2018-07-13 17:32:49 -04:00

golang-lru

This provides the lru package which implements a fixed-size thread safe LRU cache. It is based on the cache in Groupcache.

Documentation

Full docs are available on Godoc

Example

Using the LRU is very simple:

l, _ := New(128)
for i := 0; i < 256; i++ {
    l.Add(i, nil)
}
if l.Len() != 128 {
    panic(fmt.Sprintf("bad len: %v", l.Len()))
}