(ctx context.Context, apiClient client.SystemAPIClient, options client.RegistryLoginOptions)
| 338 | } |
| 339 | |
| 340 | func 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 | |
| 353 | func loginClientSide(ctx context.Context, options client.RegistryLoginOptions) (client.RegistryLoginResult, error) { |
| 354 | svc, err := registry.NewService(registry.ServiceOptions{}) |
no test coverage detected
searching dependent graphs…