consul/internal/controller/cache
Matt Keeler 6c4b83c119
Allow reuse of cache indexes (#20562)
Previously calling `index.New` would return an object with the index information such as the Indexer, whether it was required, and the name of the index as well as a radix tree to store indexed data.

Now the main `Index` type doesn’t contain the radix tree for indexed data. Instead the `IndexedData` method can be used to combine the main `Index` with a radix tree in the `IndexedData` structure.

The cache still only allows configuring the `Index` type and will invoke the `IndexedData` method on the provided indexes to get the structure that the cache can use for actual data management.

All of this makes it now safe to reuse the `index.Index` types.
2024-02-09 13:00:21 -05:00
..
cachemock Add Common Controller Caching Infrastructure (#19767) 2023-12-13 10:06:39 -05:00
index Allow reuse of cache indexes (#20562) 2024-02-09 13:00:21 -05:00
indexers Allow reuse of cache indexes (#20562) 2024-02-09 13:00:21 -05:00
testdata Add Common Controller Caching Infrastructure (#19767) 2023-12-13 10:06:39 -05:00
.mockery.yaml Add Common Controller Caching Infrastructure (#19767) 2023-12-13 10:06:39 -05:00
cache.go Add Common Controller Caching Infrastructure (#19767) 2023-12-13 10:06:39 -05:00
cache_test.go Add Common Controller Caching Infrastructure (#19767) 2023-12-13 10:06:39 -05:00
client.go Add Common Controller Caching Infrastructure (#19767) 2023-12-13 10:06:39 -05:00
client_test.go Add Common Controller Caching Infrastructure (#19767) 2023-12-13 10:06:39 -05:00
clone.go In-Memory gRPC (#19942) 2024-01-12 11:54:07 -05:00
clone_test.go In-Memory gRPC (#19942) 2024-01-12 11:54:07 -05:00
decoded.go Migrate the Endpoints controller to use the controller cache (#20241) 2024-01-18 17:52:52 -05:00
decoded_test.go Migrate the Endpoints controller to use the controller cache (#20241) 2024-01-18 17:52:52 -05:00
errors.go Add Common Controller Caching Infrastructure (#19767) 2023-12-13 10:06:39 -05:00
errors_test.go Add Common Controller Caching Infrastructure (#19767) 2023-12-13 10:06:39 -05:00
kind.go Allow reuse of cache indexes (#20562) 2024-02-09 13:00:21 -05:00
kind_test.go Add Common Controller Caching Infrastructure (#19767) 2023-12-13 10:06:39 -05:00