MCPcopy Index your code
hub / github.com/docker/cli / loginWithRegistry

Function loginWithRegistry

cli/command/registry/login.go:340–351  ·  view source on GitHub ↗
(ctx context.Context, apiClient client.SystemAPIClient, options client.RegistryLoginOptions)

Source from the content-addressed store, hash-verified

338}
339
340func loginWithRegistry(ctx context.Context, apiClient client.SystemAPIClient, options client.RegistryLoginOptions) (client.RegistryLoginResult, error) {
341 res, err := apiClient.RegistryLogin(ctx, options)
342 if err != nil {
343 if client.IsErrConnectionFailed(err) {
344 // daemon isn't responding; attempt to login client side.
345 return loginClientSide(ctx, options)
346 }
347 return client.RegistryLoginResult{}, err
348 }
349
350 return res, nil
351}
352
353func loginClientSide(ctx context.Context, options client.RegistryLoginOptions) (client.RegistryLoginResult, error) {
354 svc, err := registry.NewService(registry.ServiceOptions{})

Callers 2

loginWithDeviceCodeFlowFunction · 0.85

Calls 2

loginClientSideFunction · 0.85
RegistryLoginMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…