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

Function NewDistributorWithConfigFile

integration/e2ecortex/services.go:38–69  ·  view source on GitHub ↗
(name string, store RingStore, address, configFile string, flags map[string]string, image string)

Source from the content-addressed store, hash-verified

36}
37
38func NewDistributorWithConfigFile(name string, store RingStore, address, configFile string, flags map[string]string, image string) *CortexService {
39 if configFile != "" {
40 flags["-config.file"] = filepath.Join(e2e.ContainerSharedDir, configFile)
41 }
42
43 // Configure the ingesters ring backend
44 flags["-ring.store"] = string(store)
45 switch store {
46 case RingStoreConsul:
47 flags["-consul.hostname"] = address
48 case RingStoreEtcd:
49 flags["-etcd.endpoints"] = address
50 }
51
52 if image == "" {
53 image = GetDefaultImage()
54 }
55
56 return NewCortexService(
57 name,
58 image,
59 e2e.NewCommandWithoutEntrypoint("cortex", e2e.BuildArgs(e2e.MergeFlags(map[string]string{
60 "-target": "distributor",
61 "-log.level": "warn",
62 "-auth.enabled": "true",
63 "-distributor.replication-factor": "1",
64 }, flags))...),
65 e2e.NewHTTPReadinessProbe(httpPort, "/ready", 200, 299),
66 httpPort,
67 grpcPort,
68 )
69}
70
71func NewQuerier(name string, store RingStore, address string, flags map[string]string, image string) *CortexService {
72 return NewQuerierWithConfigFile(name, store, address, "", flags, image)

Calls 7

BuildArgsFunction · 0.92
MergeFlagsFunction · 0.92
NewHTTPReadinessProbeFunction · 0.92
GetDefaultImageFunction · 0.85
NewCortexServiceFunction · 0.85
JoinMethod · 0.80