open-consul/agent/cache
Daniel Nephin 1251c01b73 agent/cache: Make all cache options RegisterOptions
Previously the SupportsBlocking option was specified by a method on the
type, and all the other options were specified from RegisterOptions.

This change moves RegisterOptions to a method on the type, and moves
SupportsBlocking into the options struct.

Currently there are only 2 cache-types. So all cache-types can implement
this method by embedding a struct with those predefined values. In the
future if a cache type needs to be registered more than once with different
options it can remove the embedded type and implement the method in a way
that allows for paramaterization.
2020-04-16 18:56:34 -04:00
..
cache.go agent/cache: Make all cache options RegisterOptions 2020-04-16 18:56:34 -04:00
cache_test.go agent/cache: Make all cache options RegisterOptions 2020-04-16 18:56:34 -04:00
entry.go Remove TTL from cacheEntryExpiry 2020-04-13 13:10:38 -04:00
entry_test.go agent/cache: unit tests for ExpiryHeap, found a bug! 2018-06-14 09:42:03 -07:00
mock_Request.go agent/cache: Make all cache options RegisterOptions 2020-04-16 18:56:34 -04:00
mock_Type.go agent/cache: Make all cache options RegisterOptions 2020-04-16 18:56:34 -04:00
request.go Support Agent Caching for Service Discovery Results (#4541) 2018-10-10 16:55:34 +01:00
testing.go agent/cache: Make all cache options RegisterOptions 2020-04-16 18:56:34 -04:00
type.go agent/cache: Make all cache options RegisterOptions 2020-04-16 18:56:34 -04:00
watch.go agent/cache: Make all cache options RegisterOptions 2020-04-16 18:56:34 -04:00
watch_test.go agent/cache: Make all cache options RegisterOptions 2020-04-16 18:56:34 -04:00