mirror of
https://github.com/distribution/distribution.git
synced 2025-09-06 17:31:32 +00:00
Move context package internal
Our context package predates the establishment of current best practices regarding context usage and it shows. It encourages bad practices such as using contexts to propagate non-request-scoped values like the application version and using string-typed keys for context values. Move the package internal to remove it from the API surface of distribution/v3@v3.0.0 so we are free to iterate on it without being constrained by compatibility. Signed-off-by: Cory Snider <csnider@mirantis.com>
This commit is contained in:
@@ -5,9 +5,9 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/distribution/distribution/v3/context"
|
||||
"github.com/distribution/distribution/v3/internal/client/auth"
|
||||
"github.com/distribution/distribution/v3/internal/client/auth/challenge"
|
||||
"github.com/distribution/distribution/v3/internal/dcontext"
|
||||
)
|
||||
|
||||
const challengeHeader = "Docker-Distribution-Api-Version"
|
||||
@@ -44,7 +44,7 @@ func configureAuth(username, password, remoteURL string) (auth.CredentialStore,
|
||||
}
|
||||
|
||||
for _, url := range authURLs {
|
||||
context.GetLogger(context.Background()).Infof("Discovered token authentication URL: %s", url)
|
||||
dcontext.GetLogger(dcontext.Background()).Infof("Discovered token authentication URL: %s", url)
|
||||
creds[url] = userpass{
|
||||
username: username,
|
||||
password: password,
|
||||
|
Reference in New Issue
Block a user