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

Function prepareInMemoryAlertStore

pkg/alertmanager/multitenant_test.go:2264–2270  ·  view source on GitHub ↗

prepareInMemoryAlertStore builds and returns an in-memory alert store.

()

Source from the content-addressed store, hash-verified

2262
2263// prepareInMemoryAlertStore builds and returns an in-memory alert store.
2264func prepareInMemoryAlertStore() (alertstore.AlertStore, error) {
2265 usersScannerConfig := users.UsersScannerConfig{Strategy: users.UserScanStrategyList}
2266 reg := prometheus.NewPedanticRegistry()
2267 bucket := objstore.NewInMemBucket()
2268 mBucketClient := &alertstore.MockBucket{Bucket: bucket}
2269 return bucketclient.NewBucketAlertStore(mBucketClient, usersScannerConfig, nil, log.NewNopLogger(), reg)
2270}
2271
2272func prepareUserDir(t *testing.T, storeDir string, user string) (userDir string, templateDir string) {
2273 userDir = filepath.Join(storeDir, user)

Calls 1

NewBucketAlertStoreFunction · 0.92

Tested by

no test coverage detected