Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
compile
Browse files Browse the repository at this point in the history
  • Loading branch information
aarshkshah1992 committed Sep 20, 2023
1 parent 8e1d706 commit 8a4982a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions blockstore_caboose.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func newCabooseBlockStore(orchestrator, loggingEndpoint string, cdns *cachedDNS)
}

saturnOrchestratorClient := &http.Client{
Timeout: caboose.DefaultSaturnOrchestratorRequestTimeout,
Timeout: caboose.DefaultOrchestratorRequestTimeout,
Transport: &customTransport{
AuthorizationBearerToken: os.Getenv(EnvSaturnLoggerSecret),
RoundTripper: &http.Transport{
Expand All @@ -53,7 +53,7 @@ func newCabooseBlockStore(orchestrator, loggingEndpoint string, cdns *cachedDNS)
}

saturnLoggerClient := &http.Client{
Timeout: caboose.DefaultSaturnOrchestratorRequestTimeout, // caboose does nto provide custom timeout for logger, reusing one for orchestrator
Timeout: caboose.DefaultOrchestratorRequestTimeout, // caboose does nto provide custom timeout for logger, reusing one for orchestrator
Transport: &customTransport{
AuthorizationBearerToken: os.Getenv(EnvSaturnLoggerSecret),
RoundTripper: &http.Transport{
Expand All @@ -64,7 +64,7 @@ func newCabooseBlockStore(orchestrator, loggingEndpoint string, cdns *cachedDNS)
}

saturnRetrievalClient := &http.Client{
Timeout: caboose.DefaultSaturnCarRequestTimeout,
Timeout: caboose.DefaultCarRequestTimeout,
Transport: otelhttp.NewTransport(&customTransport{
RoundTripper: &http.Transport{
// Increasing concurrency defaults from http.DefaultTransport
Expand Down Expand Up @@ -102,7 +102,7 @@ func newCabooseBlockStore(orchestrator, loggingEndpoint string, cdns *cachedDNS)

DoValidation: true,
PoolRefresh: caboose.DefaultPoolRefreshInterval,
SaturnClient: saturnRetrievalClient,
Client: saturnRetrievalClient,

ComplianceCidPeriod: int64(5),
})
Expand Down
2 changes: 1 addition & 1 deletion lib/gateway_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func GatewayError(err error) error {

// All timeouts should produce 504 Gateway Timeout
if errors.Is(err, context.DeadlineExceeded) ||
errors.Is(err, caboose.ErrSaturnTimeout) ||
errors.Is(err, caboose.ErrTimeout) ||
// Unfortunately this is not an exported type so we have to check for the content.
strings.Contains(err.Error(), "Client.Timeout exceeded") {
return fmt.Errorf("%w: %s", gateway.ErrGatewayTimeout, err.Error())
Expand Down

0 comments on commit 8a4982a

Please sign in to comment.