(clientCfg grpcclient.ConfigWithHealthCheck, addr string, requestDuration *prometheus.HistogramVec)
| 32 | } |
| 33 | |
| 34 | func dialStoreGatewayClient(clientCfg grpcclient.ConfigWithHealthCheck, addr string, requestDuration *prometheus.HistogramVec) (*storeGatewayClient, error) { |
| 35 | opts, err := clientCfg.DialOption(grpcclient.Instrument(requestDuration)) |
| 36 | if err != nil { |
| 37 | return nil, err |
| 38 | } |
| 39 | |
| 40 | conn, err := grpc.NewClient(addr, opts...) |
| 41 | if err != nil { |
| 42 | return nil, errors.Wrapf(err, "failed to dial store-gateway %s", addr) |
| 43 | } |
| 44 | |
| 45 | return &storeGatewayClient{ |
| 46 | StoreGatewayClient: storegatewaypb.NewStoreGatewayClient(conn), |
| 47 | HealthClient: grpc_health_v1.NewHealthClient(conn), |
| 48 | conn: conn, |
| 49 | }, nil |
| 50 | } |
| 51 | |
| 52 | type storeGatewayClient struct { |
| 53 | storegatewaypb.StoreGatewayClient |
no test coverage detected