Skip to content

Commit

Permalink
ZING-34847: use same options for data receiver and registry (#32)
Browse files Browse the repository at this point in the history
* use same options for data receiver and registry

* reuse connection
  • Loading branch information
VTGare authored Aug 28, 2024
1 parent ec2509c commit fd98585
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions endpoint/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,7 @@ func New(config Config) (*Endpoint, error) {
// Dial doesn't block by default. So no error can actually occur.
conn, _ := grpc.Dial(config.Address, dialOptions...)
client = data_receiver.NewDataReceiverServiceClient(conn)
regDialOption := grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{}))
regconn, _ := grpc.Dial(config.Address, regDialOption)
regclient = data_registry.NewDataRegistryServiceClient(regconn)
regclient = data_registry.NewDataRegistryServiceClient(conn)
}

var cache *ttlcache.Cache[string, MetricIDNameAndHash]
Expand Down

0 comments on commit fd98585

Please sign in to comment.