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

Method SetRulesConfig

pkg/configs/db/db.go:41–41  ·  view source on GitHub ↗

SetRulesConfig does a compare-and-swap (CAS) on the user's rules config. `oldConfig` must precisely match the current config in order to change the config to `newConfig`. Will return `true` if the config was updated, `false` otherwise.

(ctx context.Context, userID string, oldConfig, newConfig userconfig.RulesConfig)

Source from the content-addressed store, hash-verified

39 // `oldConfig` must precisely match the current config in order to change the config to `newConfig`.
40 // Will return `true` if the config was updated, `false` otherwise.
41 SetRulesConfig(ctx context.Context, userID string, oldConfig, newConfig userconfig.RulesConfig) (bool, error)
42
43 // GetAllRulesConfigs gets all of the ruler configs
44 GetAllRulesConfigs(ctx context.Context) (map[string]userconfig.VersionedRulesConfig, error)

Callers 2

SetRulesConfigMethod · 0.65
SetRulesConfigMethod · 0.65

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

no outgoing calls

Tested by

no test coverage detected