Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linter #605

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion balancer/provider/balancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func NewBalancer() (*BalancerImpl, error) {
threshold[i] = configThresholds[i]
threshold[metricsCount+i] = configThresholds[i]
}
conn, err := grpc.Dial(config.BalancerConfig().CoordinatorAddress, grpc.WithTransportCredentials(insecure.NewCredentials()))
conn, err := grpc.NewClient(config.BalancerConfig().CoordinatorAddress, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/coordctl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var (

func DialCoordinator(r *topology.Router) (*grpc.ClientConn, error) {
// TODO: add creds, remove WithInsecure
return grpc.Dial(r.Address, grpc.WithInsecure()) //nolint:all
return grpc.NewClient(r.Address, grpc.WithInsecure()) //nolint:all
}

var rootCmd = &cobra.Command{
Expand Down
2 changes: 1 addition & 1 deletion coordinator/provider/coordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func DialRouter(r *topology.Router) (*grpc.ClientConn, error) {
Str("router-id", r.ID).
Msg("dialing router")
// TODO: add creds
return grpc.Dial(r.Address, grpc.WithInsecure()) //nolint:all
return grpc.NewClient(r.Address, grpc.WithInsecure()) //nolint:all
}

type CoordinatorClient interface {
Expand Down
4 changes: 2 additions & 2 deletions router/console/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (l *LocalInstanceConsole) proxyProc(ctx context.Context, tstmt spqrparser.S
if err != nil {
return err
}
conn, err := grpc.Dial(coordAddr, grpc.WithInsecure()) //nolint:all
conn, err := grpc.NewClient(coordAddr, grpc.WithInsecure()) //nolint:all
if err != nil {
return err
}
Expand All @@ -107,7 +107,7 @@ func (l *LocalInstanceConsole) proxyProc(ctx context.Context, tstmt spqrparser.S
if err != nil {
return err
}
conn, err := grpc.Dial(coordAddr, grpc.WithInsecure()) //nolint:all
conn, err := grpc.NewClient(coordAddr, grpc.WithInsecure()) //nolint:all
if err != nil {
return err
}
Expand Down
4 changes: 3 additions & 1 deletion test/feature/spqr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -553,10 +553,12 @@ func (tctx *testContext) stepHostIsStopped(service string) error {
return false
}
addr := strings.Split(output, "\n")[1]
conn, err := grpc.Dial(addr, grpc.WithInsecure()) //nolint:all
conn, err := grpc.NewClient(addr, grpc.WithInsecure()) //nolint:all
if err != nil {
return false
}
defer conn.Close()

client := protos.NewRouterServiceClient(conn)
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
defer cancel()
Expand Down
Loading