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

Function NewStoreGatewayWithConfigFile

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

Source from the content-addressed store, hash-verified

128}
129
130func NewStoreGatewayWithConfigFile(name string, store RingStore, address string, configFile string, flags map[string]string, image string) *CortexService {
131 if configFile != "" {
132 flags["-config.file"] = filepath.Join(e2e.ContainerSharedDir, configFile)
133 }
134
135 switch store {
136 case RingStoreConsul:
137 flags["-consul.hostname"] = address
138 flags["-store-gateway.sharding-ring.consul.hostname"] = address
139 case RingStoreEtcd:
140 flags["-etcd.endpoints"] = address
141 flags["-store-gateway.sharding-ring.etcd.endpoints"] = address
142 }
143
144 if image == "" {
145 image = GetDefaultImage()
146 }
147
148 return NewCortexService(
149 name,
150 image,
151 e2e.NewCommandWithoutEntrypoint("cortex", e2e.BuildArgs(e2e.MergeFlags(map[string]string{
152 "-target": "store-gateway",
153 "-log.level": "warn",
154 // Store-gateway ring backend.
155 "-store-gateway.sharding-enabled": "true",
156 "-store-gateway.sharding-ring.store": string(store),
157 "-store-gateway.sharding-ring.replication-factor": "1",
158 // Startup quickly.
159 "-store-gateway.sharding-ring.wait-stability-min-duration": "0",
160 "-store-gateway.sharding-ring.wait-stability-max-duration": "0",
161 }, flags))...),
162 e2e.NewHTTPReadinessProbe(httpPort, "/ready", 200, 299),
163 httpPort,
164 grpcPort,
165 )
166}
167
168func NewIngester(name string, store RingStore, address string, flags map[string]string, image string) *CortexService {
169 return NewIngesterWithConfigFile(name, store, address, "", flags, image)

Callers 1

NewStoreGatewayFunction · 0.85

Calls 7

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

Tested by

no test coverage detected