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

Method SetRulesConfig

pkg/configs/db/timed.go:97–106  ·  view source on GitHub ↗
(ctx context.Context, userID string, oldCfg, newCfg userconfig.RulesConfig)

Source from the content-addressed store, hash-verified

95}
96
97func (t timed) SetRulesConfig(ctx context.Context, userID string, oldCfg, newCfg userconfig.RulesConfig) (bool, error) {
98 var updated bool
99 err := instrument.CollectedRequest(ctx, "DB.SetRulesConfig", databaseRequestDuration, instrument.ErrorCode, func(ctx context.Context) error {
100 var err error
101 updated, err = t.d.SetRulesConfig(ctx, userID, oldCfg, newCfg)
102 return err
103 })
104
105 return updated, err
106}
107
108func (t timed) GetAllRulesConfigs(ctx context.Context) (map[string]userconfig.VersionedRulesConfig, error) {
109 var cfgs map[string]userconfig.VersionedRulesConfig

Callers

nothing calls this directly

Calls 1

SetRulesConfigMethod · 0.65

Tested by

no test coverage detected