consul/agent/metadata
R.B. Boyer 00d74abc4a
metadata: memoize the parsed build versions (#22113)
There will only be a small set of consul build versions that a single consul
server will witness. Inside of metadata.IsConsulServer we use a very
expensive function in the hashicorp/go-version library to parse these into
read-only *version.Version structs all over Consul.

Memoize these in a package cache map. Likely the thing will only have like
2 keys in it ever over the life of the process.
2025-02-03 16:22:10 -06:00
..
build.go metadata: memoize the parsed build versions (#22113) 2025-02-03 16:22:10 -06:00
build_test.go [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
server.go metadata: memoize the parsed build versions (#22113) 2025-02-03 16:22:10 -06:00
server_internal_test.go [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00
server_test.go [COMPLIANCE] License changes (#18443) 2023-08-11 09:12:13 -04:00