MCPcopy
hub / github.com/grafana/tempo / InitFrontend

Function InitFrontend

modules/frontend/config.go:160–168  ·  view source on GitHub ↗

InitFrontend initializes V1 frontend Returned RoundTripper can be wrapped in more round-tripper middlewares, and then eventually registered into HTTP server using the Handler from this package. Returned RoundTripper is always non-nil (if there are no errors), and it uses the returned frontend (if a

(cfg v1.Config, log log.Logger, reg prometheus.Registerer)

Source from the content-addressed store, hash-verified

158// into HTTP server using the Handler from this package. Returned RoundTripper is always non-nil
159// (if there are no errors), and it uses the returned frontend (if any).
160func InitFrontend(cfg v1.Config, log log.Logger, reg prometheus.Registerer) (pipeline.RoundTripper, *v1.Frontend, error) {
161 statVersion.Set("v1")
162 // No scheduler = use original frontend.
163 fr, err := v1.New(cfg, log, reg)
164 if err != nil {
165 return nil, nil, err
166 }
167 return fr, fr, nil
168}

Callers 1

initQueryFrontendMethod · 0.92

Calls 2

NewFunction · 0.92
SetMethod · 0.65

Tested by

no test coverage detected