distribution/registry/api/v2
Aaron Lehmann 853e2e92d8 Do not recreate mux router for each incoming request
(*App).context, called in the HTTP handler on each request, creates a
URLBuilder, which involves calling Router(). This shows up in profiles a
hot spot because it involves compiling the regexps which define all the
routes. For efficiency, cache the router and return the same object each
time.

It appears to be safe to reuse the router because GetRoute is the only
method ever called on the returned router object.

Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2022-07-08 14:17:17 -07:00
..
descriptors.go Update PUT and PATCH APIs 2021-06-29 14:16:33 -04:00
doc.go Move registry api definitions under registry package 2015-02-10 17:32:22 -08:00
errors.go Merge pull request #3143 from eyJhb/pagination 2021-05-22 15:05:18 +01:00
fuzz.go Fuzzing: Add 3 fuzzers 2021-11-29 20:59:28 +00:00
headerparser.go Honor X-Forwarded-Port and Forwarded headers 2016-11-02 16:49:42 +01:00
headerparser_test.go Honor X-Forwarded-Port and Forwarded headers 2016-11-02 16:49:42 +01:00
routes.go Do not recreate mux router for each incoming request 2022-07-08 14:17:17 -07:00
routes_test.go api: url typo in specification 2017-07-18 14:48:55 -07:00
urls.go Add tests for tags list pagination 2021-05-22 15:31:18 +01:00
urls_test.go Add tests for tags list pagination 2021-05-22 15:31:18 +01:00