Skip to content

Commit

Permalink
Merge pull request #18 from chuntaojun/fix_docker_deploy
Browse files Browse the repository at this point in the history
fix:polaris-limiter connect polaris-server
  • Loading branch information
chuntaojun authored Feb 16, 2023
2 parents f08ee73 + cee67a2 commit 295b057
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bootstrap/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (

"github.com/golang/protobuf/ptypes/wrappers"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/metadata"

"github.com/polarismesh/polaris-limiter/apiserver"
Expand Down Expand Up @@ -104,7 +105,10 @@ func startHeartbeat(ctx context.Context) {
func doWithPolarisClient(handle func(polaris.PolarisGRPCClient) error) error {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
conn, err := grpc.DialContext(ctx, polarisServerAddress, grpc.WithInsecure())
var opts []grpc.DialOption
opts = append(opts, grpc.WithTransportCredentials(insecure.NewCredentials()))

conn, err := grpc.DialContext(ctx, polarisServerAddress, opts...)
if err != nil {
return err
}
Expand Down

0 comments on commit 295b057

Please sign in to comment.