github.com/muhammadn/cortex@v1.9.1-0.20220510110439-46bb7000d03d/pkg/configs/config.go (about)

     1  package configs
     2  
     3  import (
     4  	"flag"
     5  
     6  	"github.com/cortexproject/cortex/pkg/configs/api"
     7  	"github.com/cortexproject/cortex/pkg/configs/db"
     8  )
     9  
    10  type Config struct {
    11  	DB  db.Config  `yaml:"database"`
    12  	API api.Config `yaml:"api"`
    13  }
    14  
    15  // RegisterFlags adds the flags required to configure this to the given FlagSet.
    16  func (cfg *Config) RegisterFlags(f *flag.FlagSet) {
    17  	cfg.DB.RegisterFlags(f)
    18  	cfg.API.RegisterFlags(f)
    19  }