mirror of
https://github.com/mayflower/docker-ls.git
synced 2025-11-28 00:01:09 +03:00
API level token caching, statistics.
This commit is contained in:
@@ -17,6 +17,7 @@ type paginatedRequestResponse interface {
|
||||
|
||||
type paginatedRequestContext interface {
|
||||
path() string
|
||||
tokenCacheHint() string
|
||||
validateApiResponse(response *http.Response, initialRequest bool) error
|
||||
processPartialResponse(response paginatedRequestResponse, apiResponse interface{})
|
||||
createResponse(api *registryApi) paginatedRequestResponse
|
||||
@@ -24,7 +25,7 @@ type paginatedRequestContext interface {
|
||||
}
|
||||
|
||||
func (r *registryApi) executePaginatedRequest(ctx paginatedRequestContext, url *url.URL, initialRequest bool) (response *http.Response, close bool, err error) {
|
||||
response, err = r.connector.Get(url)
|
||||
response, err = r.connector.Get(url, ctx.tokenCacheHint())
|
||||
|
||||
if err != nil {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user