MCPcopy Create free account
hub / github.com/cortexproject/cortex / GetAllRulesConfigs

Method GetAllRulesConfigs

pkg/configs/db/memory/memory.go:120–129  ·  view source on GitHub ↗

GetAllRulesConfigs gets the rules configs for all users that have them.

(ctx context.Context)

Source from the content-addressed store, hash-verified

118
119// GetAllRulesConfigs gets the rules configs for all users that have them.
120func (d *DB) GetAllRulesConfigs(ctx context.Context) (map[string]userconfig.VersionedRulesConfig, error) {
121 cfgs := map[string]userconfig.VersionedRulesConfig{}
122 for user, c := range d.cfgs {
123 cfg := c.GetVersionedRulesConfig()
124 if cfg != nil {
125 cfgs[user] = *cfg
126 }
127 }
128 return cfgs, nil
129}
130
131// GetRulesConfigs gets the rules configs that have changed
132// since the given config version.

Callers

nothing calls this directly

Implementers 4

timedpkg/configs/db/timed.go
tracedpkg/configs/db/traced.go
DBpkg/configs/db/postgres/postgres.go
DBpkg/configs/db/memory/memory.go

Calls 1

Tested by

no test coverage detected