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

Method GetRulesConfigs

pkg/configs/db/memory/memory.go:133–145  ·  view source on GitHub ↗

GetRulesConfigs gets the rules configs that have changed since the given config version.

(ctx context.Context, since userconfig.ID)

Source from the content-addressed store, hash-verified

131// GetRulesConfigs gets the rules configs that have changed
132// since the given config version.
133func (d *DB) GetRulesConfigs(ctx context.Context, since userconfig.ID) (map[string]userconfig.VersionedRulesConfig, error) {
134 cfgs := map[string]userconfig.VersionedRulesConfig{}
135 for user, c := range d.cfgs {
136 if c.ID <= since {
137 continue
138 }
139 cfg := c.GetVersionedRulesConfig()
140 if cfg != nil {
141 cfgs[user] = *cfg
142 }
143 }
144 return cfgs, nil
145}

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