| 110 | } |
| 111 | |
| 112 | func (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 | |
| 127 | func (t *Cortex) initServer() (services.Service, error) { |
| 128 | // Cortex handles signals on its own. |