MCPcopy Create free account
hub / github.com/cortexproject/cortex / createFrontendClient

Method createFrontendClient

pkg/ruler/frontend_client_pool.go:53–68  ·  view source on GitHub ↗
(addr string)

Source from the content-addressed store, hash-verified

51}
52
53func (f *frontendPool) createFrontendClient(addr string) (client.PoolClient, error) {
54 opts, err := f.grpcConfig.DialOption(grpcclient.Instrument(f.frontendClientRequestDuration))
55 if err != nil {
56 return nil, err
57 }
58
59 conn, err := grpc.NewClient(addr, opts...)
60 if err != nil {
61 return nil, err
62 }
63
64 return &frontendClient{
65 FrontendClient: NewFrontendClient(httpgrpc.NewHTTPClient(conn), f.timeout, f.prometheusHTTPPrefix, f.queryResponseFormat),
66 HealthClient: grpc_health_v1.NewHealthClient(conn),
67 }, nil
68}
69
70type frontendClient struct {
71 *FrontendClient

Callers

nothing calls this directly

Calls 3

InstrumentFunction · 0.92
NewFrontendClientFunction · 0.70
DialOptionMethod · 0.45

Tested by

no test coverage detected