1
0
mirror of https://github.com/moby/moby.git synced 2025-07-29 07:21:35 +03:00

Pass upstream client's user agent through to registry on operations beyond pulls

This adds support for the passthrough on build, push, login, and search.

Revamp the integration test to cover these cases and make it more
robust.

Use backticks instead of quoted strings for backslash-heavy string
contstands.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This commit is contained in:
Aaron Lehmann
2016-03-18 14:42:40 -07:00
parent 278d3962a8
commit c44e7a3e63
17 changed files with 109 additions and 70 deletions

View File

@ -4,6 +4,7 @@ import (
"github.com/docker/engine-api/types"
"github.com/docker/engine-api/types/events"
"github.com/docker/engine-api/types/filters"
"golang.org/x/net/context"
)
// Backend is the methods that need to be implemented to provide
@ -13,5 +14,5 @@ type Backend interface {
SystemVersion() types.Version
SubscribeToEvents(since, sinceNano int64, ef filters.Args) ([]events.Message, chan interface{})
UnsubscribeFromEvents(chan interface{})
AuthenticateToRegistry(authConfig *types.AuthConfig) (string, string, error)
AuthenticateToRegistry(ctx context.Context, authConfig *types.AuthConfig) (string, string, error)
}