tests(unified-storage): use unified storage grpc client (#101063)

This commit is contained in:
Jean-Philippe Quéméner
2025-02-20 15:03:08 +01:00
committed by GitHub
parent 92304646e6
commit 4a8b1ba61b
2 changed files with 5 additions and 6 deletions
+3 -3
View File
@@ -115,7 +115,7 @@ func newClient(opts options.StorageOptions,
}
// Create a connection to the gRPC server.
conn, err := grpcConn(opts.Address, reg)
conn, err := GrpcConn(opts.Address, reg)
if err != nil {
return nil, err
}
@@ -161,8 +161,8 @@ func newResourceClient(conn *grpc.ClientConn, cfg *setting.Cfg, features feature
return resource.NewRemoteResourceClient(tracer, conn, clientCfgMapping(grpcutils.ReadGrpcClientConfig(cfg)), cfg.Env == setting.Dev)
}
// grpcConn creates a new gRPC connection to the provided address.
func grpcConn(address string, reg prometheus.Registerer) (*grpc.ClientConn, error) {
// GrpcConn creates a new gRPC connection to the provided address.
func GrpcConn(address string, reg prometheus.Registerer) (*grpc.ClientConn, error) {
// This works for now as the Provide function is only called once during startup.
// We might eventually want to tight this factory to a struct for more runtime control.
metrics := clientMetrics{