MCPcopy Index your code
hub / github.com/cortexproject/cortex / dialRulerClient

Function dialRulerClient

pkg/ruler/client_pool.go:67–83  ·  view source on GitHub ↗
(clientCfg grpcclient.Config, addr string, requestDuration *prometheus.HistogramVec)

Source from the content-addressed store, hash-verified

65}
66
67func dialRulerClient(clientCfg grpcclient.Config, addr string, requestDuration *prometheus.HistogramVec) (*rulerExtendedClient, error) {
68 opts, err := clientCfg.DialOption(grpcclient.Instrument(requestDuration))
69 if err != nil {
70 return nil, err
71 }
72
73 conn, err := grpc.NewClient(addr, opts...)
74 if err != nil {
75 return nil, errors.Wrapf(err, "failed to dial ruler %s", addr)
76 }
77
78 return &rulerExtendedClient{
79 RulerClient: NewRulerClient(conn),
80 HealthClient: grpc_health_v1.NewHealthClient(conn),
81 conn: conn,
82 }, nil
83}
84
85type rulerExtendedClient struct {
86 RulerClient

Callers 1

newRulerClientFactoryFunction · 0.85

Calls 3

InstrumentFunction · 0.92
NewRulerClientFunction · 0.85
DialOptionMethod · 0.45

Tested by

no test coverage detected