stackube/vendor/github.com/hashicorp/golang-lru
Pengfei Ni b9bf13f065 Add stackube proxy
- Adds stackube proxy which listens on endpoints, services and
  namespaces, creates load balancer rules for clusterIP service
- Switch to govendor for managing vendors
- Add hack scripts for verifying govet and gofmt

Change-Id: I8594c16d294f46ae0d3dec6dae6fa491e7891b8b
Implements: blueprint stackube-proxy
2017-07-20 16:21:59 +08:00
..
simplelru Add stackube proxy 2017-07-20 16:21:59 +08:00
2q.go Add framework of auth-controller 2017-06-22 18:16:27 +08:00
arc.go Add framework of auth-controller 2017-06-22 18:16:27 +08:00
LICENSE Add framework of auth-controller 2017-06-22 18:16:27 +08:00
lru.go Add framework of auth-controller 2017-06-22 18:16:27 +08:00
README.md Add framework of auth-controller 2017-06-22 18:16:27 +08: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()))
}