# Functions
New creates a new cache with the given RPC client and reasonable defaults.
NewMockRequest creates a new instance of MockRequest.
NewMockType creates a new instance of MockType.
TestCacheGetCh returns a channel that returns the result of the Get call.
TestCacheGetChResult tests that the result from TestCacheGetCh matches within a reasonable period of time (it expects it to be "immediate" but waits some milliseconds).
TestCacheNotifyChResult tests that the expected updated was delivered on a Notify() chan within a reasonable period of time (it expects it to be "immediate" but waits some milliseconds).
TestRequest returns a Request that returns the given cache key and index.
TestType returns a MockType that sets default RegisterOptions.
TestTypeNonBlocking returns a MockType that returns false to SupportsBlocking.
# Constants
3 attempts before backing off.
maximum backoff wait time.
DefaultEntryFetchMaxBurst is the number of cache entry fetches that can occur in a burst.
DefaultEntryFetchRate is the default rate at which cache entries can be fetch.
# Structs
Cache is a agent-local cache of Consul data.
FetchOptions are various settable options when a Fetch is called.
FetchResult is the result of a Type Fetch operation and contains the data along with metadata gathered from that operation.
MockRequest is an autogenerated mock type for the Request type.
MockType is an autogenerated mock type for the Type type.
Options are options for the Cache.
RegisterOptions are options that can be associated with a type being registered for the cache.
# Interfaces
Type implements the logic to fetch certain types of data.
# Type aliases
Callback is the function type accepted by NotifyCallback.
Request is a cacheable request.
RequestInfo represents cache information for a request.
ResultMeta is returned from Get calls along with the value and can be used to expose information about the cache status for debugging or testing.
UpdateEvent is a struct summarizing an update to a cache entry.