ceph-csi/vendor/github.com/hashicorp/golang-lru
Niels de Vos 91774fc936 rebase: vendor dependencies for Vault API
Uses github.com/libopenstorage/secrets to communicate with Vault. This
removes the need for maintaining our own limited Vault APIs.

By adding the new dependency, several other packages got updated in the
process. Unused indirect dependencies have been removed from go.mod.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-11-29 04:03:59 +00:00
..
simplelru Add recover middleware for grpc server 2019-08-01 11:02:27 +00:00
.gitignore Migrate from dep to go module 2020-03-17 10:44:07 +00:00
2q.go vendor update for E2E framework 2019-06-04 11:39:42 +05:30
arc.go vendor update for E2E framework 2019-06-04 11:39:42 +05:30
doc.go vendor update for E2E framework 2019-06-04 11:39:42 +05:30
go.mod Migrate from dep to go module 2020-03-17 10:44:07 +00:00
LICENSE vendor update for E2E framework 2019-06-04 11:39:42 +05:30
lru.go rebase: vendor dependencies for Vault API 2020-11-29 04:03:59 +00:00
README.md Migrate from dep to go module 2020-03-17 10:44:07 +00: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()))
}