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

Method initConfig

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

Source from the content-addressed store, hash-verified

742}
743
744func (t *Cortex) initConfig() (serv services.Service, err error) {
745 t.ConfigDB, err = db.New(t.Cfg.Configs.DB)
746 if err != nil {
747 return
748 }
749
750 t.Cfg.Configs.API.NameValidationScheme = t.Cfg.NameValidationScheme
751 t.ConfigAPI = configAPI.New(t.ConfigDB, t.Cfg.Configs.API)
752 t.ConfigAPI.RegisterRoutes(t.Server.HTTP)
753 return services.NewIdleService(nil, func(_ error) error {
754 t.ConfigDB.Close()
755 return nil
756 }), nil
757}
758
759func (t *Cortex) initAlertManager() (serv services.Service, err error) {
760 t.Cfg.Alertmanager.ShardingRing.ListenPort = t.Cfg.Server.GRPCListenPort

Callers 2

TestConfig_ValidateFunction · 0.80
TestConfig_ValidateFunction · 0.80

Calls 4

NewFunction · 0.92
NewIdleServiceFunction · 0.92
RegisterRoutesMethod · 0.80
CloseMethod · 0.65

Tested by 2

TestConfig_ValidateFunction · 0.64
TestConfig_ValidateFunction · 0.64