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

Method initAPI

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

Source from the content-addressed store, hash-verified

110}
111
112func (t *Cortex) initAPI() (services.Service, error) {
113 t.Cfg.API.ServerPrefix = t.Cfg.Server.PathPrefix
114 t.Cfg.API.LegacyHTTPPrefix = t.Cfg.HTTPPrefix
115
116 a, err := api.New(t.Cfg.API, t.Cfg.Server, t.Server, util_log.Logger)
117 if err != nil {
118 return nil, err
119 }
120
121 t.API = a
122 t.API.RegisterAPI(t.Cfg.Server.PathPrefix, t.Cfg, newDefaultConfig())
123
124 return nil, nil
125}
126
127func (t *Cortex) initServer() (services.Service, error) {
128 // Cortex handles signals on its own.

Callers 2

TestAPIConfigFunction · 0.95

Calls 3

NewFunction · 0.92
newDefaultConfigFunction · 0.85
RegisterAPIMethod · 0.80

Tested by 2

TestAPIConfigFunction · 0.76