(_ context.Context, opts ...httpx.ResilientOptions)
| 452 | } |
| 453 | |
| 454 | func (m *RegistrySQL) HTTPClient(_ context.Context, opts ...httpx.ResilientOptions) *retryablehttp.Client { |
| 455 | opts = append(opts, |
| 456 | httpx.ResilientClientWithLogger(m.Logger()), |
| 457 | httpx.ResilientClientWithMaxRetry(2), |
| 458 | httpx.ResilientClientWithConnectionTimeout(30*time.Second)) |
| 459 | |
| 460 | if m.Config().ClientHTTPNoPrivateIPRanges() { |
| 461 | opts = append( |
| 462 | opts, |
| 463 | httpx.ResilientClientDisallowInternalIPs(), |
| 464 | httpx.ResilientClientAllowInternalIPRequestsTo(m.Config().ClientHTTPPrivateIPExceptionURLs()...), |
| 465 | ) |
| 466 | } |
| 467 | return httpx.NewResilientClient(opts...) |
| 468 | } |
| 469 | |
| 470 | func (m *RegistrySQL) OAuth2Provider() fosite.OAuth2Provider { |
| 471 | if m.fop == nil { |
nothing calls this directly
no test coverage detected