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

Method initInternalServer

cmd/tempo/app/modules.go:128–154  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

126}
127
128func (t *App) initInternalServer() (services.Service, error) {
129 if !t.cfg.InternalServer.Enable {
130 return services.NewIdleService(nil, nil), nil
131 }
132
133 DisableSignalHandling(&t.cfg.InternalServer.Config)
134 serv, err := server.New(t.cfg.InternalServer.Config)
135 if err != nil {
136 return nil, err
137 }
138
139 servicesToWaitFor := func() []services.Service {
140 svs := []services.Service(nil)
141 for m, s := range t.serviceMap {
142 // Server should not wait for itself or the server
143 if m != InternalServer && m != Server {
144 svs = append(svs, s)
145 }
146 }
147 return svs
148 }
149
150 t.InternalServer = serv
151 s := NewServerService(t.InternalServer, servicesToWaitFor)
152
153 return s, nil
154}
155
156func (t *App) initLiveStoreRing() (services.Service, error) {
157 return t.initReadRing(t.cfg.LiveStore.Ring.ToRingConfig(), ringLiveStore, ringLiveStore)

Callers

nothing calls this directly

Calls 2

DisableSignalHandlingFunction · 0.85
NewServerServiceFunction · 0.85

Tested by

no test coverage detected