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

Method initServer

pkg/cortex/modules.go:127–151  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

125}
126
127func (t *Cortex) initServer() (services.Service, error) {
128 // Cortex handles signals on its own.
129 DisableSignalHandling(&t.Cfg.Server)
130 serv, err := server.New(t.Cfg.Server)
131 if err != nil {
132 return nil, err
133 }
134
135 t.Server = serv
136
137 servicesToWaitFor := func() []services.Service {
138 svs := []services.Service(nil)
139 for m, s := range t.ServiceMap {
140 // Server should not wait for itself.
141 if m != Server {
142 svs = append(svs, s)
143 }
144 }
145 return svs
146 }
147
148 s := NewServerService(t.Server, servicesToWaitFor)
149
150 return s, nil
151}
152
153func (t *Cortex) initRing() (serv services.Service, err error) {
154 t.Cfg.Ingester.LifecyclerConfig.RingConfig.KVStore.Multi.ConfigProvider = multiClientRuntimeConfigChannel(t.RuntimeConfig)

Callers 1

TestGrpcAuthMiddlewareFunction · 0.80

Calls 2

DisableSignalHandlingFunction · 0.85
NewServerServiceFunction · 0.85

Tested by 1

TestGrpcAuthMiddlewareFunction · 0.64