Versions in this module Expand all Collapse all v1 v1.2.0 Jun 25, 2018 Changes in this version + const CacheRefreshBackoffMin + const CacheRefreshMaxWait + func TestCacheGetCh(t testing.T, c *Cache, typ string, r Request) <-chan interface + func TestCacheGetChResult(t testing.T, ch <-chan interface{}, expected interface{}) + type Cache struct + func New(*Options) *Cache + func TestCache(t testing.T) *Cache + func (c *Cache) Get(t string, r Request) (interface{}, ResultMeta, error) + func (c *Cache) RegisterType(n string, typ Type, opts *RegisterOptions) + type FetchOptions struct + MinIndex uint64 + Timeout time.Duration + type FetchResult struct + Index uint64 + Value interface{} + type MockRequest struct + func TestRequest(t testing.T, info RequestInfo) *MockRequest + func (_m *MockRequest) CacheInfo() RequestInfo + func (m *MockRequest) Reset() + type MockType struct + func TestType(t testing.T) *MockType + func (_m *MockType) Fetch(_a0 FetchOptions, _a1 Request) (FetchResult, error) + func (m *MockType) Static(r FetchResult, err error) *mock.Call + type Options struct + type RegisterOptions struct + LastGetTTL time.Duration + Refresh bool + RefreshTimeout time.Duration + RefreshTimer time.Duration + type Request interface + CacheInfo func() RequestInfo + type RequestInfo struct + Datacenter string + Key string + MinIndex uint64 + Timeout time.Duration + Token string + type ResultMeta struct + Hit bool + type Type interface + Fetch func(FetchOptions, Request) (FetchResult, error)