Skip to content

Commit

Permalink
feat: Increase timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
adanylenko committed Mar 27, 2024
1 parent e9ca6e9 commit 78f47be
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package provider
import (
"context"
"os"
"time"

"github.com/hashicorp/terraform-plugin-framework/datasource"
"github.com/hashicorp/terraform-plugin-framework/function"
Expand Down Expand Up @@ -119,7 +120,12 @@ func (p *TypesenseProvider) Configure(ctx context.Context, req provider.Configur
// Create a new typesense client using the configuration values
client := typesense.NewClient(
typesense.WithServer(api_address),
typesense.WithAPIKey(api_key))
typesense.WithAPIKey(api_key),
typesense.WithConnectionTimeout(5*time.Minute),
typesense.WithConnectionTimeout(5*time.Second),
typesense.WithCircuitBreakerMaxRequests(50),
typesense.WithCircuitBreakerInterval(2*time.Minute),
typesense.WithCircuitBreakerTimeout(1*time.Minute))

// Make the Typesense client available during DataSource and Resource
// type Configure methods.
Expand Down

0 comments on commit 78f47be

Please sign in to comment.