chore(handlers): define counters interface to store and use data
Context
This is related to Download counter for container images (&14021) and proposed implementation plan.
Problem
The registry needs to store the number of times a container repository has been downloaded.
Proposal
The GetManifest handler needs to define an interface to save each download count for both HEAD/GET requests.
- The interface should describe the operation of upserting a counter in the
counter/statisticsstore. - Implement an in-memory store to enable this functionality without requiring Redis (see #1301)
Edited by Jaime Martinez