Skip to content

Commit

Permalink
Merge pull request #84 from sev-2/feature/enhance-client-folder
Browse files Browse the repository at this point in the history
Feature/enhance client folder
  • Loading branch information
toopay authored Jan 22, 2025
2 parents fba0298 + 9e9417b commit 1aa2fe3
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 11 deletions.
5 changes: 4 additions & 1 deletion pkg/supabase/client/client.go → pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ type DefaultResponse struct {

func getClient() Client {
maxIdleConnDuration := time.Hour * 1
return &fasthttp.Client{

httpClientInstance = &fasthttp.Client{
ReadTimeout: DefaultTimeout,
WriteTimeout: DefaultTimeout,
MaxIdleConnDuration: maxIdleConnDuration,
Expand All @@ -58,6 +59,8 @@ func getClient() Client {
DNSCacheDuration: time.Hour,
}).Dial,
}

return httpClientInstance
}

func SetClient(c Client) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"
"time"

"github.com/sev-2/raiden/pkg/supabase/client"
"github.com/sev-2/raiden/pkg/client"
"github.com/stretchr/testify/assert"
"github.com/valyala/fasthttp"
)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/supabase/drivers/cloud/admin/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"

"github.com/sev-2/raiden"
"github.com/sev-2/raiden/pkg/supabase/client/net"
"github.com/sev-2/raiden/pkg/client/net"
"github.com/sev-2/raiden/pkg/supabase/objects"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/supabase/drivers/cloud/cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strings"

"github.com/sev-2/raiden"
"github.com/sev-2/raiden/pkg/client/net"
"github.com/sev-2/raiden/pkg/logger"
"github.com/sev-2/raiden/pkg/supabase/client/net"
"github.com/sev-2/raiden/pkg/supabase/objects"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/supabase/drivers/local/meta/function.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"

"github.com/sev-2/raiden"
"github.com/sev-2/raiden/pkg/supabase/client/net"
"github.com/sev-2/raiden/pkg/client/net"
"github.com/sev-2/raiden/pkg/supabase/objects"
"github.com/sev-2/raiden/pkg/supabase/query"
"github.com/sev-2/raiden/pkg/supabase/query/sql"
Expand Down
2 changes: 1 addition & 1 deletion pkg/supabase/drivers/local/meta/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"

"github.com/sev-2/raiden"
"github.com/sev-2/raiden/pkg/client/net"
"github.com/sev-2/raiden/pkg/logger"
"github.com/sev-2/raiden/pkg/supabase/client/net"
)

var MetaLogger = logger.HcLog().Named("supabase.meta")
Expand Down
2 changes: 1 addition & 1 deletion pkg/supabase/drivers/local/meta/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/lib/pq"
"github.com/sev-2/raiden"
"github.com/sev-2/raiden/pkg/supabase/client/net"
"github.com/sev-2/raiden/pkg/client/net"
"github.com/sev-2/raiden/pkg/supabase/objects"
"github.com/sev-2/raiden/pkg/supabase/query"
"github.com/sev-2/raiden/pkg/supabase/query/sql"
Expand Down
2 changes: 1 addition & 1 deletion pkg/supabase/drivers/local/meta/role.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/lib/pq"
"github.com/sev-2/raiden"
"github.com/sev-2/raiden/pkg/supabase/client/net"
"github.com/sev-2/raiden/pkg/client/net"
"github.com/sev-2/raiden/pkg/supabase/objects"
"github.com/sev-2/raiden/pkg/supabase/query"
"github.com/sev-2/raiden/pkg/supabase/query/sql"
Expand Down
2 changes: 1 addition & 1 deletion pkg/supabase/drivers/local/meta/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"sync"

"github.com/sev-2/raiden"
"github.com/sev-2/raiden/pkg/supabase/client/net"
"github.com/sev-2/raiden/pkg/client/net"
"github.com/sev-2/raiden/pkg/supabase/objects"
"github.com/sev-2/raiden/pkg/supabase/query"
"github.com/sev-2/raiden/pkg/supabase/query/sql"
Expand Down
2 changes: 1 addition & 1 deletion pkg/supabase/supabase.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (

"github.com/hashicorp/go-hclog"
"github.com/sev-2/raiden"
"github.com/sev-2/raiden/pkg/client/net"
"github.com/sev-2/raiden/pkg/logger"
"github.com/sev-2/raiden/pkg/supabase/client/net"
"github.com/sev-2/raiden/pkg/supabase/drivers/cloud"
"github.com/sev-2/raiden/pkg/supabase/drivers/cloud/admin"
"github.com/sev-2/raiden/pkg/supabase/drivers/local/meta"
Expand Down
2 changes: 1 addition & 1 deletion rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"regexp"
"strings"

"github.com/sev-2/raiden/pkg/client/net"
"github.com/sev-2/raiden/pkg/logger"
"github.com/sev-2/raiden/pkg/supabase/client/net"
"github.com/sev-2/raiden/pkg/utils"
"github.com/valyala/fasthttp"
)
Expand Down

0 comments on commit 1aa2fe3

Please sign in to comment.